Committing correct version of conflciting files

This commit is contained in:
Norbi Peti 2016-11-05 21:57:06 +01:00
parent 88a24251f9
commit 0c72166509
3 changed files with 41 additions and 49 deletions

View file

@ -1,61 +1,39 @@
package buttondevteam.perworld.main;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import buttondevteam.lib.TBMCCoreAPI;
public class MainPlugin extends JavaPlugin {
public static MainPlugin plugin;
public static volatile FileConfiguration config;
public static volatile ConfigurationSection worlds;
public static volatile ConfigurationSection players;
public static long debugClock;
public void onEnable(){
//getServer().getPluginManager().registerEvents(new WorldLoadListener(this), this);
TBMCCoreAPI.RegisterEventsForExceptions(new WorldChangeListener(this), this);
MainPlugin.getPlugin(this.getClass()).getServer().getListeningPluginChannels();
TBMCCoreAPI.RegisterEventsForExceptions(new ListenerPlayerWorldChange(this), this);
saveDefaultConfig();
WorldChangeManager.init(this);
//BukkitTask task = new initWorldSettings().runTaskLater(this, 20);
}
}
/*
public void initWorldSettings(){
Bukkit.getServer().getWorlds()
.stream()
.forEach(s -> {
FileConfiguration config = getConfig();
String name = s.getName();
if (config.get(name + ".settings.shareinvgroup") == null)
config.set(name + ".settings.shareinvgroup", name);
plugin = this;
config = getConfig();
worlds = config.getConfigurationSection("worlds");
players = config.getConfigurationSection("players");
if (config.get(name + ".settings.sharedatagroup") == null)
config.set(name + ".settings.sharedatagroup", name);
});
if (!config.contains("worlds")) config.createSection("worlds");
if (!config.contains("players")) config.createSection("players");
saveConfig();
new buttondevteam.perworld.cache.world.ShareSettings().initCache();
}
}
private void createConfig(){
try {
if (!getDataFolder().exists())
getDataFolder().mkdirs();
File file = new File(getDataFolder(), "config.yml");
if (!file.exists()){
getLogger().info("Config.yml not found, creating!");
saveDefaultConfig();
}else
getLogger().info("Config.yml found, loading!");
}catch (Exception e) {
e.printStackTrace();
}
}
*/

View file

@ -2,6 +2,7 @@ package buttondevteam.perworld.main;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -14,8 +15,12 @@ import org.bukkit.FireworkEffect;
import org.bukkit.Material;
import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftInventoryPlayer;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemFlag;
@ -36,6 +41,15 @@ import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.potion.PotionType;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_10_R1.MinecraftServer;
import net.minecraft.server.v1_10_R1.ChunkProviderServer;
import net.minecraft.server.v1_10_R1.DataConverterManager;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.PlayerList;
import net.minecraft.server.v1_10_R1.WorldServer;
public class SerializerOld {
//public void test(){

View file

@ -10,10 +10,10 @@ public class location {
public static String serialize(Location location){
return
location.getBlockX() + ","
+ location.getBlockZ() + ","
+ location.getBlockY() + ","
+ location.getPitch() + ","
+ location.getYaw();
+ location.getBlockZ() + ","
+ location.getYaw() + ","
+ location.getPitch();
}