Skip to content

Commit

Permalink
Merge pull request #841 from eccentricdevotion/console
Browse files Browse the repository at this point in the history
Add integrated console and update to 1.20.6
  • Loading branch information
eccentricdevotion authored May 12, 2024
2 parents 3827d46 + 131380b commit e7bf712
Show file tree
Hide file tree
Showing 357 changed files with 6,724 additions and 1,833 deletions.
30 changes: 15 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<release>17</release>
<release>21</release>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>2.0.2</version>
<version>2.0.3</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -162,9 +162,9 @@
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<srgIn>org.spigotmc:minecraft-server:1.20.6-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-mojang
<remappedDependencies>org.spigotmc:spigot:1.20.6-R0.1-SNAPSHOT:jar:remapped-mojang
</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
Expand All @@ -180,8 +180,8 @@
<inputFile>
${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar
</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-obf
<srgIn>org.spigotmc:minecraft-server:1.20.6-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.6-R0.1-SNAPSHOT:jar:remapped-obf
</remappedDependencies>
</configuration>
</execution>
Expand All @@ -191,7 +191,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.1-SNAPSHOT</version>
<version>3.4.0</version>
<configuration>
<archive>
<manifest>
Expand All @@ -206,7 +206,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<configuration>
<transformers>
<transformer
Expand Down Expand Up @@ -248,7 +248,7 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<version>1.20.6-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -272,7 +272,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<version>1.20.6-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -341,7 +341,7 @@
<dependency>
<groupId>com.palmergames.bukkit.towny</groupId>
<artifactId>towny</artifactId>
<version>0.100.1.0</version>
<version>0.100.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -412,7 +412,7 @@
<dependency>
<groupId>nl.rutgerkok</groupId>
<artifactId>blocklocker</artifactId>
<version>1.10.5-SNAPSHOT</version>
<version>1.12.2</version>
<type>jar</type>
<scope>provided</scope>
<exclusions>
Expand Down Expand Up @@ -452,7 +452,7 @@
<dependency>
<groupId>LibsDisguises</groupId>
<artifactId>LibsDisguises</artifactId>
<version>10.0.42-SNAPSHOT</version>
<version>10.0.44</version>
<type>jar</type>
<scope>provided</scope>
<exclusions>
Expand Down Expand Up @@ -517,7 +517,7 @@
<dependency>
<groupId>net.coreprotect</groupId>
<artifactId>coreprotect</artifactId>
<version>22.2</version>
<version>22.3</version>
<type>jar</type>
<scope>provided</scope>
<exclusions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public void run() {
ResultSetTardis rs = new ResultSetTardis(plugin, where, "", false, 0);
if (rs.resultSet()) {
Tardis tardis = rs.getTardis();
plugin.getTrackerKeeper().getIsGrowingRooms().add(tardis.getTardis_id());
plugin.getTrackerKeeper().getIsGrowingRooms().add(tardis.getTardisId());
World w = TARDISStaticLocationGetters.getWorldFromSplitString(tardis.getChunk());
ResultSetPlayerPrefs rsp = new ResultSetPlayerPrefs(plugin, p.getUniqueId().toString());
TARDISRoomData roomData = new TARDISRoomData();
roomData.setTardis_id(tardis.getTardis_id());
roomData.setTardis_id(tardis.getTardisId());
// get middle data, default to orange wool if not set
Material wall_type, floor_type;
if (rsp.resultSet()) {
Expand Down
40 changes: 35 additions & 5 deletions src/main/java/me/eccentric_nz/TARDIS/TARDIS.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public class TARDIS extends JavaPlugin {
private final HashMap<String, String> versions = new HashMap<>();
private final String versionRegex = "(\\d+[.])+\\d+";
private final Pattern versionPattern = Pattern.compile(versionRegex);
private final String serverStr = "1.20.4";
private final String serverStr = "1.20.6";
private TARDISChatGUI jsonKeeper;
private TARDISUpdateChatGUI updateChatGUI;
// public TARDISFurnaceRecipe fornacis;
Expand Down Expand Up @@ -202,6 +202,9 @@ public class TARDIS extends JavaPlugin {
private NamespacedKey tardisIdKey;
private NamespacedKey timeLordUuidKey;
private NamespacedKey standUuidKey;
private NamespacedKey interactionUuidKey;
private NamespacedKey modelUuidKey;
private NamespacedKey unaryKey;
private NamespacedKey blueprintKey;
private NamespacedKey sonicUuidKey;
private NamespacedKey sonicChargeKey;
Expand Down Expand Up @@ -306,6 +309,9 @@ public void onEnable() {
tardisIdKey = new NamespacedKey(this, "tardis_id");
timeLordUuidKey = new NamespacedKey(this, "timelord_uuid");
standUuidKey = new NamespacedKey(this, "stand_uuid");
interactionUuidKey = new NamespacedKey(this, "interaction_uuid");
modelUuidKey = new NamespacedKey(this, "model_uuid");
unaryKey = new NamespacedKey(this, "unary");
blueprintKey = new NamespacedKey(this, "blueprint");
sonicUuidKey = new NamespacedKey(this, "sonic_uuid");
sonicChargeKey = new NamespacedKey(this, "sonic_charge");
Expand Down Expand Up @@ -452,7 +458,6 @@ public void onEnable() {
tardisMapper.enable();
}
if (getConfig().getBoolean("modules.weeping_angels")) {
if (PaperLib.isPaper()) {
getMessenger().message(console, TardisModule.TARDIS, "Loading Weeping Angels Module");
new TARDISWeepingAngels(this).enable();
if (!getConfig().getBoolean("conversions.all_in_one.weeping_angels")) {
Expand All @@ -461,9 +466,6 @@ public void onEnable() {
conversions++;
}
}
} else {
getLogger().log(Level.WARNING, "The Weeping Angels Module requires Paper server or a suitable variant!");
}
}
if (getConfig().getBoolean("modules.vortex_manipulator")) {
getMessenger().message(console, TardisModule.TARDIS, "Loading Vortex Manipulator Module");
Expand Down Expand Up @@ -1323,6 +1325,34 @@ public NamespacedKey getTimeLordUuidKey() {
public NamespacedKey getStandUuidKey() {
return standUuidKey;
}

/**
* Gets the console interaction UUID NamespacedKey
*
* @return the console interaction UUID NamespacedKey
*/
public NamespacedKey getInteractionUuidKey() {
return interactionUuidKey;
}

/**
* Gets the console model UUID NamespacedKey
*
* @return the console model UUID NamespacedKey
*/
public NamespacedKey getModelUuidKey() {
return modelUuidKey;
}

/**
* Gets the console interaction unary NamespacedKey
*
* @return the console interaction unary NamespacedKey
*/
public NamespacedKey getUnaryKey() {
return unaryKey;
}

/**
* Gets the TARDIS Blueprint NamespacedKey
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/eccentric_nz/TARDIS/TARDISConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ public class TARDISConstants {
EntityType.DROWNED, EntityType.ELDER_GUARDIAN, EntityType.ENDERMAN, EntityType.ENDERMITE, EntityType.EVOKER, EntityType.FOX, EntityType.FROG,
EntityType.GHAST, EntityType.GIANT, EntityType.GLOW_SQUID, EntityType.GOAT, EntityType.GUARDIAN, EntityType.HOGLIN, EntityType.HORSE,
EntityType.HUSK, EntityType.ILLUSIONER, EntityType.IRON_GOLEM, EntityType.LLAMA, EntityType.MAGMA_CUBE, EntityType.MULE,
EntityType.MUSHROOM_COW, EntityType.OCELOT, EntityType.PANDA, EntityType.PARROT, EntityType.PHANTOM, EntityType.PIG, EntityType.PIGLIN,
EntityType.MOOSHROOM, EntityType.OCELOT, EntityType.PANDA, EntityType.PARROT, EntityType.PHANTOM, EntityType.PIG, EntityType.PIGLIN,
EntityType.PIGLIN_BRUTE, EntityType.PILLAGER, EntityType.PLAYER, EntityType.POLAR_BEAR, EntityType.PUFFERFISH, EntityType.RABBIT,
EntityType.RAVAGER, EntityType.SALMON, EntityType.SHEEP, EntityType.SHULKER, EntityType.SILVERFISH, EntityType.SKELETON,
EntityType.SKELETON_HORSE, EntityType.SLIME, EntityType.SNIFFER, EntityType.SNOWMAN, EntityType.SPIDER, EntityType.SQUID, EntityType.STRAY,
EntityType.SKELETON_HORSE, EntityType.SLIME, EntityType.SNIFFER, EntityType.SNOW_GOLEM, EntityType.SPIDER, EntityType.SQUID, EntityType.STRAY,
EntityType.STRIDER, EntityType.TADPOLE, EntityType.TRADER_LLAMA, EntityType.TROPICAL_FISH, EntityType.TURTLE, EntityType.VEX, EntityType.VILLAGER,
EntityType.VINDICATOR, EntityType.WANDERING_TRADER, EntityType.WARDEN, EntityType.WITCH, EntityType.WITHER, EntityType.WITHER_SKELETON,
EntityType.WOLF, EntityType.ZOGLIN, EntityType.ZOMBIE, EntityType.ZOMBIE_HORSE, EntityType.ZOMBIE_VILLAGER, EntityType.ZOMBIFIED_PIGLIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
import me.eccentric_nz.TARDIS.commands.utils.TARDISWeatherListener;
import me.eccentric_nz.TARDIS.companionGUI.TARDISCompanionAddGUIListener;
import me.eccentric_nz.TARDIS.companionGUI.TARDISCompanionGUIListener;
import me.eccentric_nz.TARDIS.console.ConsoleInteractionListener;
import me.eccentric_nz.TARDIS.console.telepathic.TelepathicBiomeListener;
import me.eccentric_nz.TARDIS.console.telepathic.TelepathicGUIListener;
import me.eccentric_nz.TARDIS.console.telepathic.TelepathicStructureListener;
import me.eccentric_nz.TARDIS.control.TARDISControlListener;
import me.eccentric_nz.TARDIS.control.TARDISControlMenuListener;
import me.eccentric_nz.TARDIS.customblocks.TARDISDisplayBlockListener;
Expand Down Expand Up @@ -193,6 +197,7 @@ TARDISInformationSystemListener registerListeners() {
plugin.getPM().registerEvents(new TARDISDismountListener(plugin), plugin);
plugin.getPM().registerEvents(new TARDISDisplayBlockListener(plugin), plugin);
plugin.getPM().registerEvents(new TARDISDisplayListener(plugin), plugin);
plugin.getPM().registerEvents(new ConsoleInteractionListener(plugin), plugin);
plugin.getPM().registerEvents(new TARDISEjectListener(plugin), plugin);
plugin.getPM().registerEvents(new TARDISEntityGriefListener(plugin), plugin);
plugin.getPM().registerEvents(new TARDISExplosionAndDamageListener(plugin), plugin);
Expand Down Expand Up @@ -319,6 +324,10 @@ TARDISInformationSystemListener registerListeners() {
plugin.getPM().registerEvents(new TARDISAntiBuildListener(plugin), plugin);
}
plugin.getPM().registerEvents(new TARDISPlayerKickListener(plugin), plugin);
// telepathic listeners
plugin.getPM().registerEvents(new TelepathicGUIListener(plugin), plugin);
plugin.getPM().registerEvents(new TelepathicBiomeListener(plugin), plugin);
plugin.getPM().registerEvents(new TelepathicStructureListener(plugin), plugin);
if (plugin.getPlanetsConfig().getBoolean("planets.skaro.enabled")) {
plugin.debug("Skaro enabled, registering planet event listeners");
if (plugin.getPlanetsConfig().getBoolean("planets.skaro.acid")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class TARDISTrackerInstanceKeeper {
private final HashMap<UUID, Integer> secondaryRemovers = new HashMap<>();
private final HashMap<UUID, Integer> siegeCarrying = new HashMap<>();
private final HashMap<UUID, JsonObject> pastes = new HashMap<>();
private final HashMap<UUID, List<Location>> repeaters = new HashMap<>();
private final HashMap<UUID, List<Location>> manualFlightLocations = new HashMap<>();
private final HashMap<UUID, List<UUID>> renderedNPCs = new HashMap<>();
private final HashMap<UUID, Location> activeForceFields = new HashMap<>();
private final HashMap<UUID, Location> dispersed = new HashMap<>();
Expand Down Expand Up @@ -464,10 +464,10 @@ public HashMap<UUID, JsonObject> getPastes() {
/**
* Another tracker for TARDIS Manual flight mode
*
* @return a Map of player UUIDs and their TARDIS repeater control locations
* @return a Map of player UUIDs and their TARDIS control locations
*/
public HashMap<UUID, List<Location>> getRepeaters() {
return repeaters;
public HashMap<UUID, List<Location>> getManualFlightLocations() {
return manualFlightLocations;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ public void onConsoleInventoryClick(InventoryClickEvent event) {
} // Memory circuit (saves/areas)
case 10001975, 20001975 -> {
new_inv = plugin.getServer().createInventory(p, 54, ChatColor.DARK_RED + "TARDIS Dimension Map");
stack = new TARDISSavesPlanetInventory(plugin, tardis.getTardis_id()).getPlanets();
stack = new TARDISSavesPlanetInventory(plugin, tardis.getTardisId()).getPlanets();
} // Input circuit (terminal)
case 10001976, 20001976 -> {
new_inv = plugin.getServer().createInventory(p, 54, ChatColor.DARK_RED + "Destination Terminal");
stack = new TARDISTerminalInventory(plugin).getTerminal();
}
// scanner circuit
default -> new TARDISScanner(plugin).scan(tardis.getTardis_id(), p, tardis.getRenderer(), tardis.getArtron_level());
default -> new TARDISScanner(plugin).scan(tardis.getTardisId(), p, tardis.getRenderer(), tardis.getArtronLevel());
}
// close inventory
p.closeInventory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public boolean writeSave(Player player, String[] args) {
return false;
} else {
Tardis tardis = rs.getTardis();
int id = tardis.getTardis_id();
int id = tardis.getTardisId();
ChameleonPreset preset = tardis.getPreset();
// check has unique name - this will always return false in HARD & MEDIUM difficulty
// TODO check for disk lore if MEDIUM difficulty
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/me/eccentric_nz/TARDIS/api/TARDII.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import me.eccentric_nz.tardisweepingangels.utils.Monster;
import org.bukkit.*;
import org.bukkit.World.Environment;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -172,8 +172,8 @@ public TARDISData getTARDISMapData(int id) {
}
}
}
String powered = (tardis.isPowered_on()) ? "Yes" : "No";
String siege = (tardis.isSiege_on()) ? "Yes" : "No";
String powered = (tardis.isPoweredOn()) ? "Yes" : "No";
String siege = (tardis.isSiegeOn()) ? "Yes" : "No";
String abandoned = (tardis.isAbandoned()) ? "Yes" : "No";
List<String> occupants = getPlayersInTARDIS(id);
data = new TARDISData(owner, current, console, chameleon, door, powered, siege, abandoned, occupants);
Expand Down Expand Up @@ -797,7 +797,7 @@ public String setDesktopWallAndFloor(UUID uuid, String wall, String floor, boole
TARDISUpgradeData tud = new TARDISUpgradeData();
tud.setSchematic(current_console);
tud.setPrevious(current_console);
tud.setLevel(rs.getTardis().getArtron_level());
tud.setLevel(rs.getTardis().getArtronLevel());
tud.setWall(wall);
tud.setFloor(floor);
// change the wall and floor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final class TARDISRoomGrowEvent extends TARDISEvent {
*
* @param player the player growing the room
* @param tardis the Tardis data object, may be null - if room was manually grown, use {@link
* #getRoomData()}.getTardis_id()
* #getRoomData()}.getTardisId()
* @param slot the TARDISARSSlot data object, may be null - if the room was manually grown, use {@link
* #getRoomData()}.getLocation()
* @param roomData the TARDISRoomData data object
Expand Down
Loading

0 comments on commit e7bf712

Please sign in to comment.