mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
update to 1.7.9
This commit is contained in:
parent
50f772d142
commit
21652cf085
@ -65,7 +65,7 @@ public class DPlayer {
|
||||
|
||||
double health = ((Damageable) player).getHealth();
|
||||
|
||||
this.savePlayer = new DSavePlayer(player.getName(), player.getUniqueId().toString(), player.getLocation(), player.getInventory().getContents(), player.getInventory().getArmorContents(), player.getLevel(),
|
||||
this.savePlayer = new DSavePlayer(player.getName(), player.getUniqueId(), player.getLocation(), player.getInventory().getContents(), player.getInventory().getArmorContents(), player.getLevel(),
|
||||
player.getTotalExperience(), (int) health, player.getFoodLevel(), player.getFireTicks(), player.getGameMode(), player.getActivePotionEffects());
|
||||
|
||||
this.player.getInventory().clear();
|
||||
@ -159,6 +159,7 @@ public class DPlayer {
|
||||
if (gworld.isTutorial) {
|
||||
p.permission.playerAddGroup(this.player, p.mainConfig.tutorialEndGroup);
|
||||
p.permission.playerRemoveGroup(this.player, p.mainConfig.tutorialStartGroup);
|
||||
p.getServer().dispatchCommand(p.getServer().getConsoleSender(), "pex user "+player.getName()+" group set "+p.mainConfig.tutorialEndGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
@ -24,7 +25,7 @@ public class DSavePlayer {
|
||||
|
||||
// Variables
|
||||
private String playerName;
|
||||
private String uuid;
|
||||
private UUID uuid;
|
||||
|
||||
private Location oldLocation;
|
||||
private ItemStack[] oldInventory;
|
||||
@ -37,7 +38,7 @@ public class DSavePlayer {
|
||||
private GameMode oldGamemode;
|
||||
private Collection<PotionEffect> oldPotionEffects;
|
||||
|
||||
public DSavePlayer(String playerName, String uuid, Location oldLocation, ItemStack[] oldInventory, ItemStack[] oldArmor, int oldLvl, int oldExp, int oldHealth, int oldFoodLevel, int oldFireTicks,
|
||||
public DSavePlayer(String playerName, UUID uuid, Location oldLocation, ItemStack[] oldInventory, ItemStack[] oldArmor, int oldLvl, int oldExp, int oldHealth, int oldFoodLevel, int oldFireTicks,
|
||||
GameMode oldGamemode, Collection<PotionEffect> oldPotionEffects) {
|
||||
savePlayers.add(this);
|
||||
|
||||
@ -144,7 +145,7 @@ public class DSavePlayer {
|
||||
|
||||
for (String playerName : configFile.getKeys(false)) {
|
||||
// Load uuid
|
||||
String uuid = configFile.getString(playerName + ".uuid");
|
||||
UUID uuid = UUID.fromString(configFile.getString(playerName + ".uuid"));
|
||||
|
||||
// Load inventory data
|
||||
ArrayList<ItemStack> oldInventoryList = (ArrayList<ItemStack>) configFile.get(playerName + ".oldInventory");
|
||||
|
@ -7,12 +7,13 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import net.milkbowl.vault.permission.Permission;
|
||||
import net.minecraft.server.v1_7_R2.EntityPlayer;
|
||||
import net.minecraft.server.v1_7_R2.MinecraftServer;
|
||||
import net.minecraft.server.v1_7_R2.PlayerInteractManager;
|
||||
import net.minecraft.server.v1_7_R3.EntityPlayer;
|
||||
import net.minecraft.server.v1_7_R3.MinecraftServer;
|
||||
import net.minecraft.server.v1_7_R3.PlayerInteractManager;
|
||||
import net.minecraft.util.com.mojang.authlib.GameProfile;
|
||||
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
@ -22,8 +23,8 @@ import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.craftbukkit.v1_7_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_7_R3.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -434,7 +435,7 @@ public class P extends JavaPlugin {
|
||||
return NumberUtils.toInt(string, 0);
|
||||
}
|
||||
|
||||
public Player getOfflinePlayer(String player, String uuid) {
|
||||
public Player getOfflinePlayer(String player, UUID uuid) {
|
||||
Player pplayer = null;
|
||||
try {
|
||||
File playerfolder = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "players");
|
||||
@ -461,7 +462,7 @@ public class P extends JavaPlugin {
|
||||
return pplayer;
|
||||
}
|
||||
|
||||
public Player getOfflinePlayer(String player, String uuid, Location location) {
|
||||
public Player getOfflinePlayer(String player, UUID uuid, Location location) {
|
||||
Player pplayer = null;
|
||||
try {
|
||||
File playerfolder = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "players");
|
||||
|
@ -91,7 +91,7 @@ public class EntityListener implements Listener {
|
||||
Entity entity2 = sub.getEntity();
|
||||
|
||||
if (entity instanceof Projectile) {
|
||||
entity = ((Projectile) entity).getShooter();
|
||||
entity = (Entity) ((Projectile) entity).getShooter();
|
||||
}
|
||||
|
||||
if (entity instanceof Player && entity2 instanceof Player) {
|
||||
|
Loading…
Reference in New Issue
Block a user