Upgrade to mc 1.12

This commit is contained in:
ProgrammerDan committed 2017-06-09 00:36:43 -04:00
1 parent 27d37b5519
commit d9176f84b5
4 files changed
+48 -24

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
# Editorconfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
continuation_indent_size = 8
[*.java]
indent_style = tab
indent_size = 4
[*.xml]
indent_style = tab
indent_size = 2
[*.yml]
indent_style = space
indent_size = 2
+7 -7
View File
@@ -6,7 +6,7 @@
<groupId>com.programmerdan.minecraft</groupId>
<artifactId>SimpleAdminHacks</artifactId>
<packaging>jar</packaging>
<version>1.1.1</version>
<version>1.2.0</version>
<name>SimpleAdminHacks</name>
<url>https://github.com/DevotedMC/SimpleAdminHacks</url>
@@ -107,13 +107,13 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<version>1.12-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.minelink</groupId>
<artifactId>CombatTagPlus</artifactId>
<version>1.2.4-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@@ -142,24 +142,24 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib-API</artifactId>
<version>4.0-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>vg.civcraft.mc.namelayer</groupId>
<artifactId>NameLayer</artifactId>
<version>2.9.08</version>
<version>2.11.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>vg.civcraft.mc.citadel</groupId>
<artifactId>Citadel</artifactId>
<version>3.7.02</version>
<version>3.9.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>vg.civcraft.mc.civmodcore</groupId>
<artifactId>CivModCore</artifactId>
<version>1.5.09</version>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
<!-- Note: CrazyCrates isn't distributed in POM form.
@@ -5,9 +5,9 @@ import java.util.Set;
import java.util.UUID;
import vg.civcraft.mc.namelayer.NameAPI;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.NBTTagList;
import net.minecraft.server.v1_10_R1.WorldNBTStorage;
import net.minecraft.server.v1_12_R1.NBTTagCompound;
import net.minecraft.server.v1_12_R1.NBTTagList;
import net.minecraft.server.v1_12_R1.WorldNBTStorage;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -16,9 +16,9 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftInventoryPlayer;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryPlayer;
import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryCloseEvent;
@@ -89,7 +89,7 @@ public class InvControl extends SimpleHack<InvControlConfig> implements CommandE
int food = rawPlayer.getInt("foodLevel");
// Fun NMS inventory reconstruction from file data.
net.minecraft.server.v1_10_R1.PlayerInventory nms_pl_inv = new net.minecraft.server.v1_10_R1.PlayerInventory(null);
net.minecraft.server.v1_12_R1.PlayerInventory nms_pl_inv = new net.minecraft.server.v1_12_R1.PlayerInventory(null);
NBTTagList inv = rawPlayer.getList("Inventory", rawPlayer.getTypeId());
nms_pl_inv.b(inv); // We use this to bypass the Craft code which requires a player object, unlike NMS.
PlayerInventory pl_inv = (PlayerInventory) new CraftInventoryPlayer(nms_pl_inv);
@@ -3,13 +3,13 @@ package com.programmerdan.minecraft.simpleadminhacks.hacks;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.server.v1_10_R1.EntityTracker;
import net.minecraft.server.v1_10_R1.EntityTrackerEntry;
import net.minecraft.server.v1_10_R1.WorldServer;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_12_R1.EntityTracker;
import net.minecraft.server.v1_12_R1.EntityTrackerEntry;
import net.minecraft.server.v1_12_R1.WorldServer;
import net.minecraft.server.v1_12_R1.PacketPlayOutEntityTeleport;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
@@ -121,12 +121,12 @@ public class InvisibleFixTwo extends SimpleHack<InvisibleFixTwoConfig> implement
EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities
.get(entity.getEntityId());
net.minecraft.server.v1_10_R1.Entity eEntity = getNmsEntity(entity);
net.minecraft.server.v1_12_R1.Entity eEntity = getNmsEntity(entity);
entry.broadcast(new PacketPlayOutEntityTeleport(eEntity));
}
private net.minecraft.server.v1_10_R1.Entity getNmsEntity(final Entity entity) {
private net.minecraft.server.v1_12_R1.Entity getNmsEntity(final Entity entity) {
CraftEntity craftEntity = (CraftEntity) entity;
return craftEntity.getHandle();
}
@@ -175,5 +175,4 @@ public class InvisibleFixTwo extends SimpleHack<InvisibleFixTwoConfig> implement
public static InvisibleFixTwoConfig generate(SimpleAdminHacks plugin, ConfigurationSection config) {
return new InvisibleFixTwoConfig(plugin, config);
}
}
}