Added Logging Levels to messages. Level 0-1 are super quiet. Only errors
appear. Level 2 is standard use (Basic Gameplay events show up.). Level 3 is standard debug use. Levels 4-5 are spammy debug modes. Also fixed Stained Clay color displays and Hardened Clay material name outputs.
This commit is contained in:
parent
4bc6abfef8
commit
338e17a4ff
Binary file not shown.
@ -2,5 +2,6 @@
|
||||
<project name="TwosideKeeper.makejar" default="makejar" basedir=".">
|
||||
<target name ="makejar" description="Create a jar for the TwosideKeeper project">
|
||||
<jar jarfile="TwosideKeeper.jar" includes="**/*.class,**/*.yml" basedir="bin"/>
|
||||
<jar jarfile="D:\Documents\Test Server\plugins\TwosideKeeper.jar" includes="**/*.class,**/*.yml" basedir="bin"/>
|
||||
</target>
|
||||
</project>
|
@ -37,3 +37,8 @@ commands:
|
||||
usage: /sound
|
||||
permission: TwosideKeeper.sound
|
||||
permission-message: No permissions!
|
||||
log:
|
||||
description: Adjusts the debugging log level for TwosideKeeper in the console.
|
||||
usage: /log
|
||||
permission: TwosideKeeper.log
|
||||
permission-message: No permissions!
|
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,7 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
import sig.plugin.TwosideKeeper.Artifact;
|
||||
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||
|
||||
public class MalleableBaseQuest {
|
||||
|
||||
@ -30,7 +31,7 @@ public class MalleableBaseQuest {
|
||||
ItemMeta m = base.getItemMeta();
|
||||
List<String> lore = new ArrayList<String>();
|
||||
lore.add(ChatColor.RED+"FORMING IN PROGRESS");
|
||||
lore.add(ChatColor.BLUE+"Base requires "+ChatColor.AQUA+"'"+TwosideKeeper.UserFriendlyMaterialName(new ItemStack(selectItem()))+"'"+ChatColor.BLUE+" to");
|
||||
lore.add(ChatColor.BLUE+"Base requires "+ChatColor.AQUA+"'"+GenericFunctions.UserFriendlyMaterialName(new ItemStack(selectItem()))+"'"+ChatColor.BLUE+" to");
|
||||
lore.add(ChatColor.BLUE+"continue forming... "+ChatColor.GREEN+"(0/30)");
|
||||
lore.add(ChatColor.BLUE+""+TwosideKeeper.getServerTickTime());
|
||||
m.setLore(lore);
|
||||
@ -66,7 +67,7 @@ public class MalleableBaseQuest {
|
||||
ItemMeta m = base.getItemMeta();
|
||||
List<String> lore = m.getLore();
|
||||
lore.remove(1);
|
||||
lore.add(1,ChatColor.BLUE+"Base requires "+ChatColor.AQUA+"'"+TwosideKeeper.UserFriendlyMaterialName(new ItemStack(selectItem()))+"'"+ChatColor.BLUE+" to");
|
||||
lore.add(1,ChatColor.BLUE+"Base requires "+ChatColor.AQUA+"'"+GenericFunctions.UserFriendlyMaterialName(new ItemStack(selectItem()))+"'"+ChatColor.BLUE+" to");
|
||||
//Get the old quest progress.
|
||||
int progress = getCurrentProgress(base);
|
||||
lore.remove(2);
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||
|
||||
public class ShopPurchase {
|
||||
String player;
|
||||
@ -18,7 +18,7 @@ public class ShopPurchase {
|
||||
public ShopPurchase(String p, Player customer, ItemStack item, double money, int amt) {
|
||||
player = p;
|
||||
this.customer=customer.getName();
|
||||
itemname = TwosideKeeper.GetItemName(item);
|
||||
itemname = GenericFunctions.GetItemName(item);
|
||||
this.money = money;
|
||||
this.amt=amt;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import org.bukkit.inventory.meta.EnchantmentStorageMeta;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.potion.PotionType;
|
||||
|
||||
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||
|
||||
public class WorldShop {
|
||||
ItemStack item;
|
||||
@ -35,7 +35,7 @@ public class WorldShop {
|
||||
this.item.getItemMeta().hasDisplayName()) {
|
||||
return this.item.getItemMeta().getDisplayName();
|
||||
} else {
|
||||
return TwosideKeeper.UserFriendlyMaterialName(this.item);
|
||||
return GenericFunctions.UserFriendlyMaterialName(this.item);
|
||||
}
|
||||
}
|
||||
public void UpdateAmount(int amt) {
|
||||
|
@ -21,6 +21,7 @@ import org.bukkit.potion.PotionEffectType;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.ItemRarity;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.MonsterType;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||
|
||||
public class MonsterController {
|
||||
/**
|
||||
@ -135,7 +136,7 @@ public class MonsterController {
|
||||
m.getEquipment().setHelmet(RandomizeEnchantments(m.getEquipment().getHelmet(),ItemRarity.RARE));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE && m.getEquipment().getHelmet().getType()==Material.IRON_HELMET) {
|
||||
ItemStack helm = m.getEquipment().getHelmet();
|
||||
m.getEquipment().setHelmet(TwosideKeeper.convertToHardenedPiece(helm, 1));
|
||||
m.getEquipment().setHelmet(GenericFunctions.convertToHardenedPiece(helm, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,7 +144,7 @@ public class MonsterController {
|
||||
m.getEquipment().setChestplate(RandomizeEnchantments(m.getEquipment().getChestplate(),ItemRarity.RARE));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE && m.getEquipment().getChestplate().getType()==Material.IRON_CHESTPLATE) {
|
||||
ItemStack helm = m.getEquipment().getChestplate();
|
||||
m.getEquipment().setChestplate(TwosideKeeper.convertToHardenedPiece(helm, 1));
|
||||
m.getEquipment().setChestplate(GenericFunctions.convertToHardenedPiece(helm, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,14 +152,14 @@ public class MonsterController {
|
||||
m.getEquipment().setLeggings(RandomizeEnchantments(m.getEquipment().getLeggings(),ItemRarity.RARE));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE && m.getEquipment().getLeggings().getType()==Material.IRON_LEGGINGS) {
|
||||
ItemStack helm = m.getEquipment().getLeggings();
|
||||
m.getEquipment().setLeggings(TwosideKeeper.convertToHardenedPiece(helm, 1));
|
||||
m.getEquipment().setLeggings(GenericFunctions.convertToHardenedPiece(helm, 1));
|
||||
}
|
||||
}
|
||||
if (m.getEquipment().getBoots()!=null && Math.random()<0.3) {
|
||||
m.getEquipment().setBoots(RandomizeEnchantments(m.getEquipment().getBoots(),ItemRarity.RARE));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE && m.getEquipment().getBoots().getType()==Material.IRON_BOOTS) {
|
||||
ItemStack helm = m.getEquipment().getBoots();
|
||||
m.getEquipment().setBoots(TwosideKeeper.convertToHardenedPiece(helm, 1));
|
||||
m.getEquipment().setBoots(GenericFunctions.convertToHardenedPiece(helm, 1));
|
||||
}
|
||||
}
|
||||
m.getEquipment().setBootsDropChance(0.3f);
|
||||
@ -230,7 +231,7 @@ public class MonsterController {
|
||||
m.getEquipment().setHelmet(RandomizeEnchantments(m.getEquipment().getHelmet(),ItemRarity.EPIC));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getHelmet();
|
||||
m.getEquipment().setHelmet(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
m.getEquipment().setHelmet(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,7 +239,7 @@ public class MonsterController {
|
||||
m.getEquipment().setChestplate(RandomizeEnchantments(m.getEquipment().getChestplate(),ItemRarity.EPIC));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getChestplate();
|
||||
m.getEquipment().setChestplate(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
m.getEquipment().setChestplate(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,7 +247,7 @@ public class MonsterController {
|
||||
m.getEquipment().setLeggings(RandomizeEnchantments(m.getEquipment().getLeggings(),ItemRarity.EPIC));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getLeggings();
|
||||
m.getEquipment().setLeggings(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
m.getEquipment().setLeggings(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,7 +255,7 @@ public class MonsterController {
|
||||
m.getEquipment().setBoots(RandomizeEnchantments(m.getEquipment().getBoots(),ItemRarity.EPIC));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getBoots();
|
||||
m.getEquipment().setBoots(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
m.getEquipment().setBoots(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*4)+2));
|
||||
}
|
||||
}
|
||||
if ((m.getType()==EntityType.ZOMBIE &&
|
||||
@ -330,7 +331,7 @@ public class MonsterController {
|
||||
m.getEquipment().setHelmet(RandomizeEnchantments(m.getEquipment().getHelmet(),ItemRarity.LEGENDARY));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getHelmet();
|
||||
m.getEquipment().setHelmet(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
m.getEquipment().setHelmet(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,7 +339,7 @@ public class MonsterController {
|
||||
m.getEquipment().setChestplate(RandomizeEnchantments(m.getEquipment().getChestplate(),ItemRarity.LEGENDARY));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getChestplate();
|
||||
m.getEquipment().setChestplate(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
m.getEquipment().setChestplate(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
}
|
||||
}
|
||||
|
||||
@ -346,7 +347,7 @@ public class MonsterController {
|
||||
m.getEquipment().setLeggings(RandomizeEnchantments(m.getEquipment().getLeggings(),ItemRarity.LEGENDARY));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getLeggings();
|
||||
m.getEquipment().setLeggings(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
m.getEquipment().setLeggings(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,7 +355,7 @@ public class MonsterController {
|
||||
m.getEquipment().setBoots(RandomizeEnchantments(m.getEquipment().getBoots(),ItemRarity.LEGENDARY));
|
||||
if (Math.random()<TwosideKeeper.RARE_DROP_RATE) {
|
||||
ItemStack helm = m.getEquipment().getBoots();
|
||||
m.getEquipment().setBoots(TwosideKeeper.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
m.getEquipment().setBoots(GenericFunctions.convertToHardenedPiece(helm, (int)(Math.random()*8)+3));
|
||||
}
|
||||
}
|
||||
if ((m.getType()==EntityType.ZOMBIE &&
|
||||
@ -576,7 +577,7 @@ public class MonsterController {
|
||||
switch (md) {
|
||||
case DANGEROUS: {
|
||||
String MonsterName = m.getType().toString().toLowerCase();
|
||||
m.setCustomName(ChatColor.DARK_AQUA+"Dangerous "+TwosideKeeper.CapitalizeFirstLetters(MonsterName.replaceAll("_", " ")+(isZombieLeader(m)?" Leader":"")));
|
||||
m.setCustomName(ChatColor.DARK_AQUA+"Dangerous "+GenericFunctions.CapitalizeFirstLetters(MonsterName.replaceAll("_", " ")+(isZombieLeader(m)?" Leader":"")));
|
||||
m.setMaxHealth(m.getMaxHealth()*2.0);
|
||||
m.setHealth(m.getMaxHealth());
|
||||
if (isAllowedToEquipItems(m)) {
|
||||
@ -586,7 +587,7 @@ public class MonsterController {
|
||||
}break;
|
||||
case DEADLY: {
|
||||
String MonsterName = m.getType().toString().toLowerCase();
|
||||
m.setCustomName(ChatColor.GOLD+"Deadly "+TwosideKeeper.CapitalizeFirstLetters(MonsterName.replaceAll("_", " ")+(isZombieLeader(m)?" Leader":"")));
|
||||
m.setCustomName(ChatColor.GOLD+"Deadly "+GenericFunctions.CapitalizeFirstLetters(MonsterName.replaceAll("_", " ")+(isZombieLeader(m)?" Leader":"")));
|
||||
m.setMaxHealth(m.getMaxHealth()*2.0);
|
||||
m.setHealth(m.getMaxHealth());
|
||||
if (isAllowedToEquipItems(m)) {
|
||||
@ -597,7 +598,7 @@ public class MonsterController {
|
||||
}break;
|
||||
case HELLFIRE:{
|
||||
String MonsterName = m.getType().toString().toLowerCase();
|
||||
m.setCustomName(ChatColor.DARK_RED+"Hellfire "+TwosideKeeper.CapitalizeFirstLetters(MonsterName.replaceAll("_", " ")+(isZombieLeader(m)?" Leader":"")));
|
||||
m.setCustomName(ChatColor.DARK_RED+"Hellfire "+GenericFunctions.CapitalizeFirstLetters(MonsterName.replaceAll("_", " ")+(isZombieLeader(m)?" Leader":"")));
|
||||
//m.setCustomName(ChatColor.DARK_AQUA+"Dangerous Mob");
|
||||
//m.setCustomNameVisible(true);
|
||||
m.setMaxHealth(m.getMaxHealth()*4.0);
|
||||
|
@ -20,7 +20,7 @@ public class Party {
|
||||
rawPos.setX((int)(rawPos.getX()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE));
|
||||
rawPos.setZ((int)(rawPos.getZ()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE));
|
||||
region=rawPos;
|
||||
Bukkit.getLogger().info(region.toString());
|
||||
TwosideKeeper.log("Party Region Position: "+region.toString(),5);
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "scoreboard objectives remove Party"+color); //Make sure the party is cleared out if it was used for something before...
|
||||
//Bukkit.getScoreboardManager().getMainScoreboard().registerNewObjective("Party"+color, "dummy");
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "scoreboard objectives add Party"+color+" dummy Your Party");
|
||||
@ -91,7 +91,7 @@ public class Party {
|
||||
partyplayers.add(p);
|
||||
for (int l=0;l<partyplayers.size();l++) {
|
||||
for (int k=0;k<TwosideKeeper.playerdata.size();k++) {
|
||||
//Bukkit.getLogger().info("Looking at playerdata structure... "+k+","+l+". Party size is "+partyplayers.size());
|
||||
TwosideKeeper.log("Looking at playerdata structure... "+k+","+l+". Party size is "+partyplayers.size(),4);
|
||||
if (TwosideKeeper.playerdata.get(k).name.equalsIgnoreCase(partyplayers.get(l).getName())) {
|
||||
TwosideKeeper.playerdata.get(k).currentparty=TeamNumber();
|
||||
TwosideKeeper.playerdata.get(k).partybonus=partyplayers.size()-1;
|
||||
@ -160,7 +160,7 @@ public class Party {
|
||||
newloc.setX((int)(newloc.getX()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE));
|
||||
newloc.setZ((int)(newloc.getZ()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE));
|
||||
region = newloc;
|
||||
Bukkit.getLogger().info(region.toString());
|
||||
TwosideKeeper.log("Region Updated: "+region.toString(),5);
|
||||
}
|
||||
public void RemoveStrayMembers() {
|
||||
int prevsiz=partyplayers.size();
|
||||
@ -170,7 +170,7 @@ public class Party {
|
||||
partyplayers.get(i).getWorld() != region.getWorld() ||
|
||||
((int)(partyplayers.get(i).getLocation().getX()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE)) != (int)region.getX() ||
|
||||
((int)(partyplayers.get(i).getLocation().getZ()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE)) != (int)region.getZ()) {
|
||||
//Bukkit.getLogger().info(((int)(partyplayers.get(i).getLocation().getX()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE))+" ;; "+((int)(partyplayers.get(i).getLocation().getZ()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE))+" - DID NOT MATCH");
|
||||
TwosideKeeper.log(((int)(partyplayers.get(i).getLocation().getX()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE))+" ;; "+((int)(partyplayers.get(i).getLocation().getZ()/(16*TwosideKeeper.PARTY_CHUNK_SIZE))*(16*TwosideKeeper.PARTY_CHUNK_SIZE))+" - DID NOT MATCH",5);
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "scoreboard players reset "+partyplayers.get(i).getName().toLowerCase()+" Party"+color);
|
||||
|
||||
for (int l=0;l<partyplayers.size();l++) {
|
||||
|
@ -55,13 +55,8 @@ public class RecyclingCenter {
|
||||
public void loadConfig() {
|
||||
File config= new File(TwosideKeeper.filesave,"recyclingcenters.data");
|
||||
if (config.exists()) {
|
||||
Bukkit.getLogger().info("Config exists. Entering.");
|
||||
TwosideKeeper.log("Config exists. Entering.",5);
|
||||
FileConfiguration workable = YamlConfiguration.loadConfiguration(config);
|
||||
|
||||
/*workable.addDefault("recyclingcenter.count", 0);
|
||||
|
||||
int total = workable.getInt("recyclingcenter.count");*/
|
||||
//Bukkit.getLogger().info("Recycling center count: "+total+" ("+workable.getKeys(false).size()+")");
|
||||
for (int i=0;i<workable.getKeys(false).size()/4;i++) {
|
||||
this.AddNode(Bukkit.getWorld(workable.getString("world"+i)), workable.getInt("blockx"+i), workable.getInt("blocky"+i), workable.getInt("blockz"+1));
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ public class SpleefGame implements Listener {
|
||||
else
|
||||
if (e instanceof PlayerInteractEvent) {
|
||||
PlayerInteractEvent ev = (PlayerInteractEvent)e;
|
||||
//plugin.getLogger().info("Interact Event received, checking...");
|
||||
TwosideKeeper.log("Interact Event received, checking...",5);
|
||||
if (ev.getAction()==Action.RIGHT_CLICK_BLOCK &&
|
||||
ev.getClickedBlock()!=null &&
|
||||
(ev.getClickedBlock().getType()==Material.SIGN ||
|
||||
@ -149,7 +149,7 @@ public class SpleefGame implements Listener {
|
||||
ev.getClickedBlock().getLocation().getBlockX()==sign.getBlockX() &&
|
||||
ev.getClickedBlock().getLocation().getBlockY()==sign.getBlockY() &&
|
||||
ev.getClickedBlock().getLocation().getBlockZ()==sign.getBlockZ() ) {
|
||||
//plugin.getLogger().info("This is a sign event.");
|
||||
TwosideKeeper.log("This is a sign event.",5);
|
||||
Block b = ev.getClickedBlock();
|
||||
if (!active) {
|
||||
//We are going to register this player to this spleef arena.
|
||||
@ -416,7 +416,7 @@ public class SpleefGame implements Listener {
|
||||
|
||||
void EndMatch(SpleefPlayerData winner) {
|
||||
//Ends the match, resolving all players, winners, and giving everything back.
|
||||
//Bukkit.getServer().getLogger().info("There are "+players.size()+" players in the registered player list.");
|
||||
TwosideKeeper.log("There are "+players.size()+" players in the registered player list.",5);
|
||||
for (int i=0;i<players.size();i++) {
|
||||
//Give all players' items back. Remove the damage resistance buff.
|
||||
RemovePlayer(players.get(i), RemovePlayerReason.GENERAL);
|
||||
@ -524,14 +524,6 @@ class SpleefPlayerData {
|
||||
|
||||
}
|
||||
public void SaveInventory() {
|
||||
/*
|
||||
for (int i=0;i<plug.getServer().getPlayer(this.player).getInventory().getContents().length;i++) {
|
||||
if (plug.getServer().getPlayer(this.player).getInventory().getContents()[i]!=null &&
|
||||
plug.getServer().getPlayer(this.player).getInventory().getExtr) {
|
||||
player_inventory.add(plug.getServer().getPlayer(this.player).getInventory().getContents()[i]);
|
||||
plug.getLogger().info("Store item "+plug.getServer().getPlayer(this.player).getInventory().getContents()[i].toString());
|
||||
}
|
||||
}*/
|
||||
File file = new File(this.plug.getDataFolder()+"/inventorybackup/inventory"+plug.getServer().getPlayer(this.player).getName()+".txt");
|
||||
|
||||
// if file doesnt exists, then create it
|
||||
|
@ -36,12 +36,12 @@ public class SpleefManager {
|
||||
public void SetupSpleefArena(SpleefArena id,Location corner1,Location corner2,Location shovel_block, Location register_sign) {
|
||||
SpleefGame newGame = new SpleefGame(plugin, id, corner1,corner2,shovel_block,register_sign);
|
||||
spleef_game_list.add(newGame);
|
||||
plugin.getLogger().info("Added new SpleefGame: "+newGame.toString());
|
||||
TwosideKeeper.log("Added new SpleefGame: "+newGame.toString(),3);
|
||||
}
|
||||
public void SetupSpleefArena(SpleefArena id, Location corner1, Location corner2, Location shovel_block, Location shovel_block2, Location register_sign) {
|
||||
SpleefGame newGame = new SpleefGame(plugin, id, corner1,corner2,shovel_block,shovel_block2,register_sign);
|
||||
spleef_game_list.add(newGame);
|
||||
plugin.getLogger().info("Added new SpleefGame: "+newGame.toString());
|
||||
TwosideKeeper.log("Added new SpleefGame: "+newGame.toString(),3);
|
||||
}
|
||||
public void PassEvent(Event e) {
|
||||
//Passes events in the world to all Spleef Games.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.MonsterType;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||
|
||||
public final class TwosideKeeperAPI {
|
||||
//MONEY COMMANDS.
|
||||
@ -57,17 +58,17 @@ public final class TwosideKeeperAPI {
|
||||
|
||||
//Hardened Item Commands.
|
||||
public static boolean isHardenedItem(ItemStack i) {
|
||||
return TwosideKeeper.isHardenedItem(i);
|
||||
return GenericFunctions.isHardenedItem(i);
|
||||
}
|
||||
public static int getHardenedItemBreaks(ItemStack i) {
|
||||
return TwosideKeeper.getHardenedItemBreaks(i);
|
||||
return GenericFunctions.getHardenedItemBreaks(i);
|
||||
}
|
||||
public static ItemStack breakHardenedItem(ItemStack i) {
|
||||
return TwosideKeeper.breakHardenedItem(i);
|
||||
return GenericFunctions.breakHardenedItem(i);
|
||||
}
|
||||
|
||||
//Friendly Name COMMANDS.
|
||||
public static String getLocalizedItemName(ItemStack i) {
|
||||
return TwosideKeeper.UserFriendlyMaterialName(i);
|
||||
return GenericFunctions.UserFriendlyMaterialName(i);
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import sig.plugin.TwosideKeeper.HelperStructures.SessionState;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.ShopPurchase;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.WorldShop;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.WorldShopSession;
|
||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||
|
||||
public class WorldShopManager {
|
||||
List<WorldShopSession> sessions = new ArrayList<WorldShopSession>();
|
||||
@ -56,7 +57,7 @@ public class WorldShopManager {
|
||||
shop.GetItem().getItemMeta().hasDisplayName()) {
|
||||
sign_lines.add(shop.GetItem().getItemMeta().getDisplayName());
|
||||
} else {
|
||||
sign_lines.add(TwosideKeeper.UserFriendlyMaterialName(shop.GetItem()));
|
||||
sign_lines.add(GenericFunctions.UserFriendlyMaterialName(shop.GetItem()));
|
||||
}
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
sign_lines.add("$"+df.format(shop.GetUnitPrice())+ChatColor.DARK_BLUE+" [x"+shop.GetAmount()+"]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user