Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packets and custom entities are now in the module! THIS WILL BE FUN TO UPDATE! Also, item scripts are pure NBT now! No more 'hidden lore' whatsoever! Hurray!
- Loading branch information
Showing
53 changed files
with
955 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
nmshandler/src/main/java/net/aufdemrand/denizen/nms/enums/CustomEntityType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package net.aufdemrand.denizen.nms.enums; | ||
|
||
public enum CustomEntityType { | ||
|
||
FAKE_ARROW, | ||
FAKE_PLAYER, | ||
ITEM_PROJECTILE | ||
} |
8 changes: 8 additions & 0 deletions
8
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/CustomEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package net.aufdemrand.denizen.nms.interfaces; | ||
|
||
import org.bukkit.entity.Entity; | ||
|
||
public interface CustomEntity extends Entity { | ||
|
||
String getEntityTypeName(); | ||
} |
13 changes: 13 additions & 0 deletions
13
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/CustomEntityHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package net.aufdemrand.denizen.nms.interfaces; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.inventory.ItemStack; | ||
|
||
public interface CustomEntityHelper { | ||
|
||
FakeArrow spawnFakeArrow(Location location); | ||
|
||
ItemProjectile spawnItemProjectile(Location location, ItemStack itemStack); | ||
|
||
FakePlayer spawnFakePlayer(Location location, String name, String skin); | ||
} |
7 changes: 7 additions & 0 deletions
7
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/FakeArrow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package net.aufdemrand.denizen.nms.interfaces; | ||
|
||
import org.bukkit.entity.Arrow; | ||
import org.bukkit.entity.Vehicle; | ||
|
||
public interface FakeArrow extends CustomEntity, Arrow, Vehicle { | ||
} |
8 changes: 8 additions & 0 deletions
8
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/FakePlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package net.aufdemrand.denizen.nms.interfaces; | ||
|
||
import org.bukkit.entity.Player; | ||
|
||
public interface FakePlayer extends CustomEntity, Player { | ||
|
||
String getFullName(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/ItemProjectile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package net.aufdemrand.denizen.nms.interfaces; | ||
|
||
import org.bukkit.entity.Item; | ||
import org.bukkit.entity.Projectile; | ||
|
||
public interface ItemProjectile extends CustomEntity, Item, Projectile { | ||
} |
16 changes: 16 additions & 0 deletions
16
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/packets/PacketHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package net.aufdemrand.denizen.nms.interfaces.packets; | ||
|
||
import org.bukkit.entity.Player; | ||
|
||
public interface PacketHandler { | ||
|
||
void receivePacket(Player player, PacketInResourcePackStatus resourcePackStatus); | ||
|
||
boolean receivePacket(Player player, PacketInSteerVehicle steerVehicle); | ||
|
||
boolean sendPacket(Player player, PacketOutChat chat); | ||
|
||
boolean sendPacket(Player player, PacketOutSpawnEntity spawnEntity); | ||
|
||
boolean sendPacket(Player player, PacketOutEntityMetadata entityMetadata); | ||
} |
6 changes: 6 additions & 0 deletions
6
...c/main/java/net/aufdemrand/denizen/nms/interfaces/packets/PacketInResourcePackStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package net.aufdemrand.denizen.nms.interfaces.packets; | ||
|
||
public interface PacketInResourcePackStatus { | ||
|
||
String getStatus(); | ||
} |
12 changes: 12 additions & 0 deletions
12
...ler/src/main/java/net/aufdemrand/denizen/nms/interfaces/packets/PacketInSteerVehicle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package net.aufdemrand.denizen.nms.interfaces.packets; | ||
|
||
public interface PacketInSteerVehicle { | ||
|
||
float getLeftwardInput(); | ||
|
||
float getForwardInput(); | ||
|
||
boolean getJumpInput(); | ||
|
||
boolean getDismountInput(); | ||
} |
16 changes: 16 additions & 0 deletions
16
nmshandler/src/main/java/net/aufdemrand/denizen/nms/interfaces/packets/PacketOutChat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package net.aufdemrand.denizen.nms.interfaces.packets; | ||
|
||
public interface PacketOutChat { | ||
|
||
int getPosition(); | ||
|
||
String getMessage(); | ||
|
||
String getRawJson(); | ||
|
||
void setPosition(int position); | ||
|
||
void setMessage(String message); | ||
|
||
void setRawJson(String rawJson); | ||
} |
8 changes: 8 additions & 0 deletions
8
.../src/main/java/net/aufdemrand/denizen/nms/interfaces/packets/PacketOutEntityMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package net.aufdemrand.denizen.nms.interfaces.packets; | ||
|
||
public interface PacketOutEntityMetadata { | ||
|
||
int getEntityId(); | ||
|
||
boolean checkForGlow(); | ||
} |
10 changes: 10 additions & 0 deletions
10
...ler/src/main/java/net/aufdemrand/denizen/nms/interfaces/packets/PacketOutSpawnEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package net.aufdemrand.denizen.nms.interfaces.packets; | ||
|
||
import java.util.UUID; | ||
|
||
public interface PacketOutSpawnEntity { | ||
|
||
int getEntityId(); | ||
|
||
UUID getEntityUuid(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.