|
| 1 | +package com.Zrips.CMI.Modules.Display; |
| 2 | + |
| 3 | +import java.lang.reflect.Constructor; |
| 4 | +import java.lang.reflect.Field; |
| 5 | +import java.lang.reflect.Method; |
| 6 | + |
| 7 | +import org.bukkit.Location; |
| 8 | +import org.bukkit.World; |
| 9 | +import org.bukkit.entity.Display.Billboard; |
| 10 | +import org.bukkit.entity.Display.Brightness; |
| 11 | +import org.bukkit.entity.Player; |
| 12 | + |
| 13 | +import net.Zrips.CMILib.Container.CMINumber; |
| 14 | + |
| 15 | +public class CMIDisplay { |
| 16 | + CMIDisplayTransform transform; |
| 17 | + |
| 18 | + private static Constructor<?> TextDisplay; |
| 19 | + private static Constructor<?> ItemDisplay; |
| 20 | + private static Constructor<?> BlockDisplay; |
| 21 | +// private static Class<?> Interaction; |
| 22 | + private static Object textDisplayEntityType; |
| 23 | + private static Object itemDisplayEntityType; |
| 24 | + private static Object blockDisplayEntityType; |
| 25 | +// private static Object interactionEntityType; |
| 26 | + private static Class<?> worldClass; |
| 27 | +// private static Method locMethod; |
| 28 | + private static Constructor<?> PacketPlayOutSpawnEntity; |
| 29 | + private static Constructor<?> PacketPlayOutEntityMetadata; |
| 30 | + private static Constructor<?> PacketPlayOutEntityDestroy; |
| 31 | + |
| 32 | + private static Method sendPacket; |
| 33 | + private static Method method1; |
| 34 | + private static Method method2; |
| 35 | + private static Field playerConnection; |
| 36 | + |
| 37 | + static { |
| 38 | + |
| 39 | + } |
| 40 | + |
| 41 | + protected Location loc; |
| 42 | + protected org.bukkit.entity.Display display; |
| 43 | + protected Object d = null; |
| 44 | + private int id = 0; |
| 45 | + |
| 46 | + public CMIDisplay(CMIDisplayType type, World world) { |
| 47 | + |
| 48 | + } |
| 49 | + |
| 50 | + |
| 51 | + public void setWidth(double width) { |
| 52 | + |
| 53 | + } |
| 54 | + |
| 55 | + public void setHeight(double height) { |
| 56 | + |
| 57 | + } |
| 58 | + |
| 59 | + public void setInterpolationDuration(int duration) { |
| 60 | + display.setInterpolationDuration(duration); |
| 61 | + } |
| 62 | + |
| 63 | + public int getInterpolationDuration() { |
| 64 | + return display.getInterpolationDuration(); |
| 65 | + } |
| 66 | + |
| 67 | + public void setInterpolationDelay(int delay) { |
| 68 | + display.setInterpolationDelay(delay); |
| 69 | + } |
| 70 | + |
| 71 | + public int getInterpolationDelay() { |
| 72 | + return display.getInterpolationDelay(); |
| 73 | + } |
| 74 | + |
| 75 | + public void setLocation(Location loc) { |
| 76 | +// display.teleport(loc); |
| 77 | + this.loc = loc; |
| 78 | + } |
| 79 | + |
| 80 | + public float getRange() { |
| 81 | + return display.getViewRange(); |
| 82 | + } |
| 83 | + |
| 84 | + public void setRange(int range) { |
| 85 | + display.setViewRange(range); |
| 86 | + } |
| 87 | + |
| 88 | + public void setBrightness(int skyValue, int blockValue) { |
| 89 | + display.setBrightness(new Brightness(CMINumber.clamp(skyValue, 0, 15), CMINumber.clamp(blockValue, 0, 15))); |
| 90 | + } |
| 91 | + |
| 92 | + public void setBillboard(Billboard billboard) { |
| 93 | + display.setBillboard(billboard); |
| 94 | + } |
| 95 | + |
| 96 | + public Billboard getBillboard() { |
| 97 | + return display.getBillboard(); |
| 98 | + } |
| 99 | + |
| 100 | + public Location getLocation() { |
| 101 | + return loc; |
| 102 | + } |
| 103 | + |
| 104 | + public Object getDisplay() { |
| 105 | + return d; |
| 106 | + } |
| 107 | + |
| 108 | + |
| 109 | + private static void sendPacket(Object connection, Object packet) { |
| 110 | + |
| 111 | + } |
| 112 | + |
| 113 | + public void show(Player player) { |
| 114 | + |
| 115 | + } |
| 116 | + |
| 117 | + |
| 118 | + public void update(Player player) { |
| 119 | + |
| 120 | + } |
| 121 | + |
| 122 | + |
| 123 | + public void destroy(Player player) { |
| 124 | + |
| 125 | + } |
| 126 | +} |
0 commit comments