mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-10-18 09:26:08 +02:00
Merge branch 'refs/heads/master' into release
This commit is contained in:
commit
3d839c2b21
@ -31,7 +31,7 @@ public interface ISettings extends IConf
|
|||||||
|
|
||||||
String getCurrencySymbol();
|
String getCurrencySymbol();
|
||||||
|
|
||||||
int getDefaultStackSize();
|
int getOversizedStackSize();
|
||||||
|
|
||||||
double getHealCooldown();
|
double getHealCooldown();
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ public final class InventoryWorkaround
|
|||||||
|
|
||||||
public static Map<Integer, ItemStack> addItem(final Inventory cinventory, final boolean forceDurability, final ItemStack... items)
|
public static Map<Integer, ItemStack> addItem(final Inventory cinventory, final boolean forceDurability, final ItemStack... items)
|
||||||
{
|
{
|
||||||
return addItem(cinventory, forceDurability, false, null, items);
|
return addItem(cinventory, forceDurability, 0, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Map<Integer, ItemStack> addItem(final Inventory cinventory, final boolean forceDurability, final boolean dontBreakStacks, final IEssentials ess, final ItemStack... items)
|
public static Map<Integer, ItemStack> addItem(final Inventory cinventory, final boolean forceDurability, final int oversizedStacks, final ItemStack... items)
|
||||||
{
|
{
|
||||||
final Map<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
|
final Map<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
|
||||||
|
|
||||||
@ -146,11 +146,12 @@ public final class InventoryWorkaround
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
final int maxAmount = oversizedStacks > 0 ? oversizedStacks : item.getType().getMaxStackSize();
|
||||||
// More than a single stack!
|
// More than a single stack!
|
||||||
if (item.getAmount() > (dontBreakStacks ? ess.getSettings().getDefaultStackSize() : item.getType().getMaxStackSize()))
|
if (item.getAmount() > maxAmount)
|
||||||
{
|
{
|
||||||
ItemStack stack = item.clone();
|
final ItemStack stack = item.clone();
|
||||||
stack.setAmount(dontBreakStacks ? ess.getSettings().getDefaultStackSize() : item.getType().getMaxStackSize());
|
stack.setAmount(maxAmount);
|
||||||
if (cinventory instanceof FakeInventory)
|
if (cinventory instanceof FakeInventory)
|
||||||
{
|
{
|
||||||
cinventory.setItem(firstFree, stack);
|
cinventory.setItem(firstFree, stack);
|
||||||
@ -159,7 +160,7 @@ public final class InventoryWorkaround
|
|||||||
{
|
{
|
||||||
EnchantmentFix.setItem(cinventory, firstFree, stack);
|
EnchantmentFix.setItem(cinventory, firstFree, stack);
|
||||||
}
|
}
|
||||||
item.setAmount(item.getAmount() - item.getType().getMaxStackSize());
|
item.setAmount(item.getAmount() - maxAmount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -183,7 +184,7 @@ public final class InventoryWorkaround
|
|||||||
|
|
||||||
final int amount = item.getAmount();
|
final int amount = item.getAmount();
|
||||||
final int partialAmount = partialItem.getAmount();
|
final int partialAmount = partialItem.getAmount();
|
||||||
final int maxAmount = dontBreakStacks ? ess.getSettings().getDefaultStackSize() : partialItem.getType().getMaxStackSize();
|
final int maxAmount = oversizedStacks > 0 ? oversizedStacks : partialItem.getType().getMaxStackSize();
|
||||||
|
|
||||||
// Check if it fully fits
|
// Check if it fully fits
|
||||||
if (amount + partialAmount <= maxAmount)
|
if (amount + partialAmount <= maxAmount)
|
||||||
|
@ -114,7 +114,7 @@ public class ItemDb implements IConf
|
|||||||
throw new Exception(_("unknownItemId", itemid));
|
throw new Exception(_("unknownItemId", itemid));
|
||||||
}
|
}
|
||||||
final ItemStack retval = new ItemStack(mat);
|
final ItemStack retval = new ItemStack(mat);
|
||||||
retval.setAmount(ess.getSettings().getDefaultStackSize());
|
retval.setAmount(mat.getMaxStackSize());
|
||||||
retval.setDurability(metaData);
|
retval.setDurability(metaData);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public enum Mob
|
|||||||
BLAZE("Blaze", Enemies.ENEMY, CreatureType.BLAZE),
|
BLAZE("Blaze", Enemies.ENEMY, CreatureType.BLAZE),
|
||||||
MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, CreatureType.MUSHROOM_COW),
|
MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, CreatureType.MUSHROOM_COW),
|
||||||
MAGMACUBE("MagmaCube", Enemies.ENEMY, CreatureType.MAGMA_CUBE),
|
MAGMACUBE("MagmaCube", Enemies.ENEMY, CreatureType.MAGMA_CUBE),
|
||||||
SNOWMAN("Snowman", Enemies.FRIENDLY, CreatureType.SNOWMAN);
|
SNOWMAN("Snowman", Enemies.FRIENDLY, "", CreatureType.SNOWMAN);
|
||||||
|
|
||||||
public static final Logger logger = Logger.getLogger("Minecraft");
|
public static final Logger logger = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
|
@ -82,9 +82,9 @@ public class Settings implements ISettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultStackSize()
|
public int getOversizedStackSize()
|
||||||
{
|
{
|
||||||
return config.getInt("default-stack-size", 64);
|
return config.getInt("oversized-stacksize", 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -189,13 +189,13 @@ public class Settings implements ISettings
|
|||||||
@Override
|
@Override
|
||||||
public double getTeleportCooldown()
|
public double getTeleportCooldown()
|
||||||
{
|
{
|
||||||
return config.getDouble("teleport-cooldown", 60);
|
return config.getDouble("teleport-cooldown", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getHealCooldown()
|
public double getHealCooldown()
|
||||||
{
|
{
|
||||||
return config.getDouble("heal-cooldown", 60);
|
return config.getDouble("heal-cooldown", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -246,7 +246,7 @@ public class Settings implements ISettings
|
|||||||
@Override
|
@Override
|
||||||
public boolean getReclaimSetting()
|
public boolean getReclaimSetting()
|
||||||
{
|
{
|
||||||
return config.getBoolean("reclaim-onlogout", true);
|
return config.getBoolean("reclaim-onlogout", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -5,12 +5,10 @@ import com.google.common.cache.CacheBuilder;
|
|||||||
import com.google.common.cache.CacheLoader;
|
import com.google.common.cache.CacheLoader;
|
||||||
import com.google.common.collect.ConcurrentHashMultiset;
|
import com.google.common.collect.ConcurrentHashMultiset;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashSet;
|
import java.util.Collections;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.logging.Level;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
|
||||||
@ -104,21 +102,9 @@ public class UserMap extends CacheLoader<String, User> implements IConf
|
|||||||
users.invalidate(name.toLowerCase(Locale.ENGLISH));
|
users.invalidate(name.toLowerCase(Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<User> getAllUsers()
|
public Set<String> getAllUniqueUsers()
|
||||||
{
|
{
|
||||||
final Set<User> userSet = new HashSet<User>();
|
return Collections.unmodifiableSet(keys.elementSet());
|
||||||
for (String name : keys)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
userSet.add(users.get(name));
|
|
||||||
}
|
|
||||||
catch (ExecutionException ex)
|
|
||||||
{
|
|
||||||
Bukkit.getLogger().log(Level.INFO, "Failed to load user " + name, ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return userSet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUniqueUsers()
|
public int getUniqueUsers()
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.earth2me.essentials.commands;
|
package com.earth2me.essentials.commands;
|
||||||
|
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.User;
|
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
@ -16,6 +16,12 @@ public class Commandbalancetop extends EssentialsCommand
|
|||||||
super("balancetop");
|
super("balancetop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final int CACHETIME = 5 * 60 * 1000;
|
||||||
|
public static final int MINUSERS = 50;
|
||||||
|
private static List<String> cache = new ArrayList<String>();
|
||||||
|
private static long cacheage = 0;
|
||||||
|
private static ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
@ -24,7 +30,7 @@ public class Commandbalancetop extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Integer.parseInt(args[0]) < 10)
|
if (Integer.parseInt(args[0]) < 19)
|
||||||
{
|
{
|
||||||
max = Integer.parseInt(args[0]);
|
max = Integer.parseInt(args[0]);
|
||||||
}
|
}
|
||||||
@ -34,31 +40,141 @@ public class Commandbalancetop extends EssentialsCommand
|
|||||||
//catch it because they tried to enter a string not number.
|
//catch it because they tried to enter a string not number.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Map<User, Double> balances = new HashMap<User, Double>();
|
|
||||||
for (User u : ess.getUserMap().getAllUsers())
|
if (lock.readLock().tryLock())
|
||||||
{
|
{
|
||||||
balances.put(u, u.getMoney());
|
try
|
||||||
|
{
|
||||||
|
if (cacheage > System.currentTimeMillis() - CACHETIME)
|
||||||
|
{
|
||||||
|
outputCache(sender, max);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
|
||||||
|
{
|
||||||
|
sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lock.readLock().unlock();
|
||||||
|
}
|
||||||
|
ess.scheduleAsyncDelayedTask(new Viewer(sender, max));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ess.getUserMap().getUniqueUsers() > MINUSERS)
|
||||||
|
{
|
||||||
|
sender.sendMessage(_("orderBalances", ess.getUserMap().getUniqueUsers()));
|
||||||
|
}
|
||||||
|
ess.scheduleAsyncDelayedTask(new Viewer(sender, max));
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Map.Entry<User, Double>> sortedEntries = new ArrayList<Map.Entry<User, Double>>(balances.entrySet());
|
}
|
||||||
Collections.sort(sortedEntries, new Comparator<Map.Entry<User, Double>>()
|
|
||||||
|
private static void outputCache(final CommandSender sender, int max)
|
||||||
|
{
|
||||||
|
sender.sendMessage(_("balanceTop", max));
|
||||||
|
for (String line : cache)
|
||||||
|
{
|
||||||
|
if (max == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
max--;
|
||||||
|
sender.sendMessage(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private class Calculator implements Runnable
|
||||||
|
{
|
||||||
|
private final transient Viewer viewer;
|
||||||
|
|
||||||
|
public Calculator(final Viewer viewer)
|
||||||
|
{
|
||||||
|
this.viewer = viewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (cacheage < System.currentTimeMillis() - 5 * 60 * 1000)
|
||||||
|
{
|
||||||
|
final Map<String, Double> balances = new HashMap<String, Double>();
|
||||||
|
for (String u : ess.getUserMap().getAllUniqueUsers())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
balances.put(u, ess.getUserMap().getUser(u).getMoney());
|
||||||
|
}
|
||||||
|
catch (NullPointerException ex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<Map.Entry<String, Double>> sortedEntries = new ArrayList<Map.Entry<String, Double>>(balances.entrySet());
|
||||||
|
Collections.sort(sortedEntries, new Comparator<Map.Entry<String, Double>>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public int compare(final Entry<User, Double> entry1, final Entry<User, Double> entry2)
|
public int compare(final Entry<String, Double> entry1, final Entry<String, Double> entry2)
|
||||||
{
|
{
|
||||||
return -entry1.getValue().compareTo(entry2.getValue());
|
return -entry1.getValue().compareTo(entry2.getValue());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
int count = 0;
|
int count = 0;
|
||||||
sender.sendMessage(_("balanceTop", max));
|
for (Map.Entry<String, Double> entry : sortedEntries)
|
||||||
for (Map.Entry<User, Double> entry : sortedEntries)
|
|
||||||
{
|
{
|
||||||
if (count == max)
|
if (count == 20)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sender.sendMessage(entry.getKey().getDisplayName() + ", " + Util.formatCurrency(entry.getValue(), ess));
|
cache.add(entry.getKey() + ", " + Util.formatCurrency(entry.getValue(), ess));
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
cacheage = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
ess.scheduleAsyncDelayedTask(viewer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private class Viewer implements Runnable
|
||||||
|
{
|
||||||
|
private final transient CommandSender sender;
|
||||||
|
private final transient int max;
|
||||||
|
|
||||||
|
public Viewer(final CommandSender sender, final int max)
|
||||||
|
{
|
||||||
|
this.sender = sender;
|
||||||
|
this.max = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
lock.readLock().lock();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (cacheage > System.currentTimeMillis() - 5 * 60 * 1000)
|
||||||
|
{
|
||||||
|
outputCache(sender, max);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lock.readLock().unlock();
|
||||||
|
}
|
||||||
|
ess.scheduleAsyncDelayedTask(new Calculator(new Viewer(sender, max)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,11 @@ public class Commandgive extends EssentialsCommand
|
|||||||
final User giveTo = getPlayer(server, args, 0);
|
final User giveTo = getPlayer(server, args, 0);
|
||||||
final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
|
final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
|
||||||
sender.sendMessage(ChatColor.BLUE + "Giving " + stack.getAmount() + " of " + itemName + " to " + giveTo.getDisplayName() + ".");
|
sender.sendMessage(ChatColor.BLUE + "Giving " + stack.getAmount() + " of " + itemName + " to " + giveTo.getDisplayName() + ".");
|
||||||
InventoryWorkaround.addItem(giveTo.getInventory(), true, true, ess, stack);
|
if (giveTo.isAuthorized("essentials.oversizedstacks")) {
|
||||||
|
InventoryWorkaround.addItem(giveTo.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
|
||||||
|
} else {
|
||||||
|
InventoryWorkaround.addItem(giveTo.getInventory(), true, stack);
|
||||||
|
}
|
||||||
giveTo.updateInventory();
|
giveTo.updateInventory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,11 @@ public class Commanditem extends EssentialsCommand
|
|||||||
|
|
||||||
final String displayName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
|
final String displayName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
|
||||||
user.sendMessage(_("itemSpawn", stack.getAmount(), displayName));
|
user.sendMessage(_("itemSpawn", stack.getAmount(), displayName));
|
||||||
InventoryWorkaround.addItem(user.getInventory(), true, true, ess, stack);
|
if (user.isAuthorized("essentials.oversizedstacks")) {
|
||||||
|
InventoryWorkaround.addItem(user.getInventory(), true, ess.getSettings().getOversizedStackSize(), stack);
|
||||||
|
} else {
|
||||||
|
InventoryWorkaround.addItem(user.getInventory(), true, stack);
|
||||||
|
}
|
||||||
user.updateInventory();
|
user.updateInventory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,12 +119,16 @@ public class Commandsell extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!s.getEnchantments().equals(is.getEnchantments()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
max += s.getAmount();
|
max += s.getAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stack)
|
if (stack)
|
||||||
{
|
{
|
||||||
amount *= 64;
|
amount *= is.getType().getMaxStackSize();
|
||||||
}
|
}
|
||||||
if (amount < 1)
|
if (amount < 1)
|
||||||
{
|
{
|
||||||
@ -133,7 +137,7 @@ public class Commandsell extends EssentialsCommand
|
|||||||
|
|
||||||
if (requireStack)
|
if (requireStack)
|
||||||
{
|
{
|
||||||
amount -= amount % 64;
|
amount -= amount % is.getType().getMaxStackSize();
|
||||||
}
|
}
|
||||||
if (amount > max || amount < 1)
|
if (amount > max || amount < 1)
|
||||||
{
|
{
|
||||||
|
@ -53,9 +53,6 @@ teleport-delay: 0
|
|||||||
# The delay, in seconds, required between /heal attempts
|
# The delay, in seconds, required between /heal attempts
|
||||||
heal-cooldown: 60
|
heal-cooldown: 60
|
||||||
|
|
||||||
# The number of items given if the quantity parameter is left out in /item or /give.
|
|
||||||
default-stack-size: 64
|
|
||||||
|
|
||||||
# What to prevent from /i /give
|
# What to prevent from /i /give
|
||||||
# e.g item-spawn-blacklist: 46,11,10
|
# e.g item-spawn-blacklist: 46,11,10
|
||||||
item-spawn-blacklist:
|
item-spawn-blacklist:
|
||||||
@ -230,6 +227,11 @@ death-messages: true
|
|||||||
no-god-in-worlds:
|
no-god-in-worlds:
|
||||||
# - world_nether
|
# - world_nether
|
||||||
|
|
||||||
|
# Oversized stacks are stacks that ignore the normal max stacksize.
|
||||||
|
# They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission.
|
||||||
|
# How many items should be in a oversized stack?
|
||||||
|
oversized-stacksize: 64
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# +------------------------------------------------------+ #
|
# +------------------------------------------------------+ #
|
||||||
# | EssentialsHome | #
|
# | EssentialsHome | #
|
||||||
@ -388,6 +390,7 @@ protect:
|
|||||||
creeper-playerdamage: false
|
creeper-playerdamage: false
|
||||||
creeper-blockdamage: false
|
creeper-blockdamage: false
|
||||||
enderman-pickup: false
|
enderman-pickup: false
|
||||||
|
villager-death: false
|
||||||
# Monsters won't follow players
|
# Monsters won't follow players
|
||||||
# permission essentials.protect.entitytarget.bypass disables this
|
# permission essentials.protect.entitytarget.bypass disables this
|
||||||
entitytarget: false
|
entitytarget: false
|
||||||
@ -415,6 +418,8 @@ protect:
|
|||||||
villager: false
|
villager: false
|
||||||
blaze: false
|
blaze: false
|
||||||
mushroom_cow: false
|
mushroom_cow: false
|
||||||
|
magma_cube: false
|
||||||
|
snowman: false
|
||||||
|
|
||||||
# Maximum height the creeper should explode. -1 allows them to explode everywhere.
|
# Maximum height the creeper should explode. -1 allows them to explode everywhere.
|
||||||
# Set prevent.creeper-explosion to true, if you want to disable creeper explosions.
|
# Set prevent.creeper-explosion to true, if you want to disable creeper explosions.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=A number goes there, silly.
|
|||||||
onlyDayNight=/time only supports day/night.
|
onlyDayNight=/time only supports day/night.
|
||||||
onlyPlayers=Only in-game players can use {0}.
|
onlyPlayers=Only in-game players can use {0}.
|
||||||
onlySunStorm=/weather only supports sun/storm.
|
onlySunStorm=/weather only supports sun/storm.
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=Der skal v\u00e6re et nummer, fjolle.
|
|||||||
onlyDayNight=/time underst\u00f8tter kun day/night.
|
onlyDayNight=/time underst\u00f8tter kun day/night.
|
||||||
onlyPlayers=Kun in-game spillere kan bruge {0}.
|
onlyPlayers=Kun in-game spillere kan bruge {0}.
|
||||||
onlySunStorm=/weather only supports sun/storm.
|
onlySunStorm=/weather only supports sun/storm.
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=Ein Zahl wird ben\u00f6tigt.
|
|||||||
onlyDayNight=/time unterst\u00fctzt nur day und night.
|
onlyDayNight=/time unterst\u00fctzt nur day und night.
|
||||||
onlyPlayers=Nur Spieler k\u00f6nnen {0} benutzen.
|
onlyPlayers=Nur Spieler k\u00f6nnen {0} benutzen.
|
||||||
onlySunStorm=/weather unterst\u00fctzt nur sun und storm.
|
onlySunStorm=/weather unterst\u00fctzt nur sun und storm.
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Zeit wurde zu {1} gesetzt.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f Zeit wurde zu {1} gesetzt.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f Zeit ist normal und entspricht der Serverzeit.
|
pTimeNormal=\u00a7e{0}''s\u00a7f Zeit ist normal und entspricht der Serverzeit.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=A number goes there, silly.
|
|||||||
onlyDayNight=/time only supports day/night.
|
onlyDayNight=/time only supports day/night.
|
||||||
onlyPlayers=Only in-game players can use {0}.
|
onlyPlayers=Only in-game players can use {0}.
|
||||||
onlySunStorm=/weather only supports sun/storm.
|
onlySunStorm=/weather only supports sun/storm.
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=Un numero es necesario, amigo.
|
|||||||
onlyDayNight=/time solo soporta day/night. (dia/noche)
|
onlyDayNight=/time solo soporta day/night. (dia/noche)
|
||||||
onlyPlayers=Solo los jugadores conectados pueden usar {0}.
|
onlyPlayers=Solo los jugadores conectados pueden usar {0}.
|
||||||
onlySunStorm=/weather solo soporta sun/storm. (sol/tormenta)
|
onlySunStorm=/weather solo soporta sun/storm. (sol/tormenta)
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f la hora es {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f la hora ha sido cambiada a {1}.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor.
|
pTimeNormal=\u00a7e{0}''s\u00a7f el tiempo es normal y coincide con el servidor.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=Il faut fournir un nombre ici.
|
|||||||
onlyDayNight=/time ne supporte que (jour) day/night (nuit).
|
onlyDayNight=/time ne supporte que (jour) day/night (nuit).
|
||||||
onlyPlayers=Seulement les joueurs en jeu peuvent utiliser {0}.
|
onlyPlayers=Seulement les joueurs en jeu peuvent utiliser {0}.
|
||||||
onlySunStorm=/weather ne supporte que (soleil) sun/storm (temp\u00eate).
|
onlySunStorm=/weather ne supporte que (soleil) sun/storm (temp\u00eate).
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f l''heure est {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f l''heure est {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f l''heure est fix\u00e9e \u00e0 {1}.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f l''heure est fix\u00e9e \u00e0 {1}.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f l''heure est normale et correspond au server.
|
pTimeNormal=\u00a7e{0}''s\u00a7f l''heure est normale et correspond au server.
|
||||||
|
@ -232,6 +232,7 @@ numberRequired=Er moet daar een nummer, grapjas.
|
|||||||
onlyDayNight=/time ondersteund alleen day/night.
|
onlyDayNight=/time ondersteund alleen day/night.
|
||||||
onlyPlayers=Alleen in-game spelers kunnen {0} gebruiken.
|
onlyPlayers=Alleen in-game spelers kunnen {0} gebruiken.
|
||||||
onlySunStorm=/weather only supports sun/storm.
|
onlySunStorm=/weather only supports sun/storm.
|
||||||
|
orderBalances=Ordering balances of {0} users, please wait ...
|
||||||
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
pTimeCurrent=\u00a7e{0}''s\u00a7f time is {1}.
|
||||||
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
pTimeCurrentFixed=\u00a7e{0}''s\u00a7f time is fixed to {1}.
|
||||||
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
pTimeNormal=\u00a7e{0}''s\u00a7f time is normal and matches the server.
|
||||||
|
@ -32,6 +32,13 @@ public class EssentialsProtectEntityListener extends EntityListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Entity target = event.getEntity();
|
final Entity target = event.getEntity();
|
||||||
|
|
||||||
|
if (target instanceof Villager && prot.getSettingBool(ProtectConfig.prevent_villager_death))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final User user = ess.getUser(target);
|
final User user = ess.getUser(target);
|
||||||
if (event instanceof EntityDamageByBlockEvent)
|
if (event instanceof EntityDamageByBlockEvent)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,7 @@ public enum ProtectConfig
|
|||||||
prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
|
prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
|
||||||
prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),
|
prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),
|
||||||
prevent_enderman_pickup("protect.prevent.enderman-pickup", false),
|
prevent_enderman_pickup("protect.prevent.enderman-pickup", false),
|
||||||
|
prevent_villager_death("protect.prevent.villager-death", false),
|
||||||
prevent_entitytarget("protect.prevent.entitytarget", false),
|
prevent_entitytarget("protect.prevent.entitytarget", false),
|
||||||
protect_rails("protect.protect.rails", true),
|
protect_rails("protect.protect.rails", true),
|
||||||
protect_below_rails("protect.protect.block-below", true),
|
protect_below_rails("protect.protect.block-below", true),
|
||||||
|
Loading…
Reference in New Issue
Block a user