1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 18:14:38 +02:00

Revert "Remove Transient :: Formatting Cleanup"

This commit is contained in:
Iaccidentally
2013-01-14 20:06:28 -05:00
parent 8e54bf13b2
commit 2a097530e5
198 changed files with 1202 additions and 1051 deletions

View File

@@ -1,20 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.essentials3</groupId>
<artifactId>BuildAll</artifactId>
<version>3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<parent>
<groupId>net.essentials3</groupId>
<artifactId>BuildAll</artifactId>
<version>3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>EssentialsSigns</artifactId>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>Essentials</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<artifactId>EssentialsSigns</artifactId>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>Essentials</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -22,7 +22,7 @@ import org.bukkit.inventory.ItemStack;
public class EssentialsSign
{
private static final Set<Material> EMPTY_SET = new HashSet<Material>();
protected final String signName;
protected transient final String signName;
public EssentialsSign(final String signName)
{
@@ -212,9 +212,8 @@ public class EssentialsSign
{
return true;
}
final BlockFace[] directions = new BlockFace[]
{
BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST
final BlockFace[] directions = new BlockFace[]{
BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST
};
for (BlockFace blockFace : directions)
{
@@ -255,7 +254,7 @@ public class EssentialsSign
{
return EMPTY_SET;
}
protected final void validateTrade(final ISign sign, final int index, final IEssentials ess) throws SignException
{
final String line = sign.getLine(index).trim();
@@ -431,8 +430,8 @@ public class EssentialsSign
static class EventSign implements ISign
{
private final SignChangeEvent event;
private final Block block;
private final transient SignChangeEvent event;
private final transient Block block;
public EventSign(final SignChangeEvent event)
{
@@ -467,8 +466,8 @@ public class EssentialsSign
public static class BlockSign implements ISign
{
private final Sign sign;
private final Block block;
private final transient Sign sign;
private final transient Block block;
public BlockSign(final Block block)
{

View File

@@ -15,8 +15,8 @@ import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsSignsPlugin extends JavaPlugin implements ISignsPlugin
{
private static final Logger LOGGER = Bukkit.getLogger();
private SignsConfigHolder config;
private static final transient Logger LOGGER = Bukkit.getLogger();
private transient SignsConfigHolder config;
@Override
public void onEnable()

View File

@@ -23,12 +23,13 @@ public class SignConfig implements StorageObject
{
this.signs = signs;
}
@Comment(
{
"How many times per second can Essentials signs be interacted with.",
"Values should be between 1-20, 20 being virtually no lag protection.",
"Lower numbers will reduce the possiblity of lag, but may annoy players."
})
{
"How many times per second can Essentials signs be interacted with.",
"Values should be between 1-20, 20 being virtually no lag protection.",
"Lower numbers will reduce the possiblity of lag, but may annoy players."
})
private int signUsesPerSecond = 4;
public int getSignUsePerSecond()

View File

@@ -9,7 +9,7 @@ import org.bukkit.plugin.Plugin;
public class SignsConfigHolder extends AsyncStorageObjectHolder<SignConfig>
{
private final Plugin plugin;
private final transient Plugin plugin;
private Set<EssentialsSign> enabledSigns = new HashSet<EssentialsSign>();
private boolean signsEnabled = false;

View File

@@ -21,8 +21,8 @@ import org.bukkit.event.block.*;
public class SignBlockListener implements Listener
{
private final IEssentials ess;
private final ISignsPlugin plugin;
private final transient IEssentials ess;
private final transient ISignsPlugin plugin;
private final static Logger LOGGER = Logger.getLogger("Minecraft");
private final static int WALL_SIGN = Material.WALL_SIGN.getId();
private final static int SIGN_POST = Material.SIGN_POST.getId();
@@ -150,7 +150,7 @@ public class SignBlockListener implements Listener
final Block block = event.getBlock();
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -175,7 +175,7 @@ public class SignBlockListener implements Listener
final Block block = event.getBlock();
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -201,7 +201,7 @@ public class SignBlockListener implements Listener
for (Block block : event.getBlocks())
{
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -229,7 +229,7 @@ public class SignBlockListener implements Listener
{
final Block block = event.getBlock();
if (((block.getTypeId() == WALL_SIGN || block.getTypeId() == SIGN_POST) && EssentialsSign.isValidSign(
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;

View File

@@ -14,8 +14,8 @@ import org.bukkit.event.entity.EntityExplodeEvent;
public class SignEntityListener implements Listener
{
private final IEssentials ess;
private final ISignsPlugin plugin;
private final transient IEssentials ess;
private final transient ISignsPlugin plugin;
public SignEntityListener(final IEssentials ess, final ISignsPlugin plugin)
{
@@ -34,7 +34,7 @@ public class SignEntityListener implements Listener
for (Block block : event.blockList())
{
if (((block.getTypeId() == Material.WALL_SIGN.getId() || block.getTypeId() == Material.SIGN_POST.getId()) && EssentialsSign.isValidSign(
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;
@@ -60,7 +60,7 @@ public class SignEntityListener implements Listener
final Block block = event.getBlock();
if (((block.getTypeId() == Material.WALL_SIGN.getId() || block.getTypeId() == Material.SIGN_POST.getId()) && EssentialsSign.isValidSign(
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
new EssentialsSign.BlockSign(block))) || EssentialsSign.checkIfBlockBreaksSigns(block))
{
event.setCancelled(true);
return;

View File

@@ -15,8 +15,8 @@ import org.bukkit.event.player.PlayerInteractEvent;
public class SignPlayerListener implements Listener
{
private final IEssentials ess;
private final ISignsPlugin plugin;
private final transient IEssentials ess;
private final transient ISignsPlugin plugin;
public SignPlayerListener(final IEssentials ess, final ISignsPlugin plugin)
{

View File

@@ -90,7 +90,7 @@ public class SignEnchant extends EssentialsSign
final ItemStack playerHand = player.getPlayer().getItemInHand();
if (playerHand == null || playerHand.getAmount() != 1 || (playerHand.containsEnchantment(enchantment) && playerHand.getEnchantmentLevel(
enchantment) == level))
enchantment) == level))
{
throw new SignException(_("missingItems", 1, sign.getLine(1)));
}

View File

@@ -55,7 +55,7 @@ public class SignKit extends EssentialsSign
final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH);
final String group = sign.getLine(2);
if ((!group.isEmpty() && ("§2Everyone".equals(group) || ess.getRanks().inGroup(player, group))) || (group.isEmpty() && Permissions.KITS.isAuthorized(
player, kitName)))
player, kitName)))
{
final Trade charge = getTrade(sign, 3, ess);
charge.isAffordableFor(player);

View File

@@ -40,9 +40,8 @@ public class SignRepair extends EssentialsSign
Commandrepair command = new Commandrepair();
command.init(ess, "repair");
String[] args = new String[]
{
sign.getLine(1)
String[] args = new String[]{
sign.getLine(1)
};
try
{

View File

@@ -53,7 +53,7 @@ public class SignWarp extends EssentialsSign
final String group = sign.getLine(2);
if ((!group.isEmpty() && ("§2Everyone".equals(group) || ess.getRanks().inGroup(player, group))) || (group.isEmpty() && Permissions.WARPS.isAuthorized(
player, warpName)))
player, warpName)))
{
final Trade charge = getTrade(sign, 3, ess);
try