[CI-SKIP] Fix some formatting inconsistencies

Remove spaces on empty lines and changed doc comment formatting
Also includes some minor comments and import fixes
This commit is contained in:
Phoenix616 2018-05-07 15:32:51 +01:00
parent b3e62f199f
commit 036d309965
21 changed files with 171 additions and 155 deletions

View File

@ -206,8 +206,7 @@ public class InventoryUtil {
}
// Don't use the armor slots or extra slots
private static int effectiveSize(Inventory inventory)
{
private static int effectiveSize(Inventory inventory) {
return getStorageContents(inventory).length;
}
@ -333,6 +332,7 @@ public class InventoryUtil {
/**
* Get the max size an item stack is allowed to stack to while respecting the STACK_TO_64 config property
*
* @param item The item to get the max stacksize of
* @return The max stacksize of the item stack's type or 64 if STACK_TO_64 is enabled
*/
@ -342,6 +342,7 @@ public class InventoryUtil {
/**
* Get an array of different item stacks that are properly stacked to their max stack size
*
* @param items The items to stack
* @return An array of item stacks which's amount is a maximum of the allowed stack size
*/

View File

@ -202,6 +202,7 @@ public class MaterialUtil {
/**
* Get an item name shortened to a max length that is still reversable by {@link #getMaterial(String)}
*
* @param itemName The name of the item
* @param maxLength The max length
* @return The name shortened to the max length
@ -552,7 +553,8 @@ public class MaterialUtil {
if (!aliases.isEmpty()) {
return aliases.iterator().next();
}
} catch (Exception ignored) {}
} catch (Exception ignored) {
}
return null;
}

View File

@ -22,7 +22,11 @@ import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.material.Directional;
import org.bukkit.material.PistonBaseMaterial;
import org.bukkit.metadata.FixedMetadataValue;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import static com.Acrobot.Breeze.Utils.BlockUtil.getAttachedBlock;
import static com.Acrobot.Breeze.Utils.BlockUtil.isSign;

View File

@ -46,8 +46,7 @@ import static org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK;
public class PlayerInteract implements Listener {
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public static void onInteract(PlayerInteractEvent event)
{
public static void onInteract(PlayerInteractEvent event) {
Block block = event.getClickedBlock();
if (block == null)
return;

View File

@ -40,6 +40,7 @@ public class NameManager {
/**
* Get account info from a UUID
*
* @param uuid The UUID of the player to get the account info
* @return The account info or <tt>null</tt> if none was found
*/
@ -66,6 +67,7 @@ public class NameManager {
/**
* Get account info from a non-shortened username
*
* @param fullName The full name of the player to get the account info
* @return The account info or <tt>null</tt> if none was found
* @throws IllegalArgumentException if the username is empty or null
@ -77,7 +79,7 @@ public class NameManager {
try {
Account account = accounts.queryBuilder().orderBy("lastSeen", false).where().eq("name", fullName).queryForFirst();
if (account != null) {
account.setName(fullName); //HOW IS IT EVEN POSSIBLE THAT UUID IS NOT SET EVEN IF WE HAVE FOUND THE PLAYER?!
account.setName(fullName); // HOW IS IT EVEN POSSIBLE THAT THE NAME IS NOT SET EVEN IF WE HAVE FOUND THE PLAYER?!
shortToAccount.put(account.getShortName(), account);
return account;
}
@ -93,6 +95,7 @@ public class NameManager {
/**
* Get account info from a username that might be shortened
*
* @param shortName The name of the player to get the account info
* @return The account info or <tt>null</tt> if none was found
* @throws IllegalArgumentException if the username is empty
@ -108,7 +111,7 @@ public class NameManager {
try {
Account account = accounts.queryBuilder().where().eq("shortName", shortName).queryForFirst();
if (account != null) {
account.setShortName(shortName); //HOW IS IT EVEN POSSIBLE THAT UUID IS NOT SET EVEN IF WE HAVE FOUND THE PLAYER?!
account.setShortName(shortName); // HOW IS IT EVEN POSSIBLE THAT THE NAME IS NOT SET EVEN IF WE HAVE FOUND THE PLAYER?!
return account;
}
} catch (SQLException e) {
@ -123,6 +126,7 @@ public class NameManager {
/**
* Get the information from the last time a player logged in that previously used the shortened name
*
* @param shortName The name of the player to get the last account for
* @return The last account or <tt>null</tt> if none was found
* @throws IllegalArgumentException if the username is not a shortened name and longer than 15 chars
@ -137,6 +141,7 @@ public class NameManager {
/**
* Get the UUID from a player's (non-shortened) username
*
* @param username The player's username
* @return The UUID or <tt>null</tt> if the UUID can't be found or an error occurred
* @deprecated Use {@link NameManager#getAccount(String)}
@ -161,6 +166,7 @@ public class NameManager {
/**
* Get the username from a player's UUID
*
* @param uuid The UUID of the player
* @return The username that is stored or <tt>null</tt> if none was found
* @deprecated Use {@link NameManager#getAccount(UUID)}
@ -184,6 +190,7 @@ public class NameManager {
/**
* Get the full username from another username that might be shortened
*
* @param shortName The name of the player to get the full username for
* @return The full username or <tt>null</tt> if none was found
* @throws IllegalArgumentException if the username is not a shortened name and longer than 15 chars
@ -200,6 +207,7 @@ public class NameManager {
/**
* Get the short username from a full username
*
* @param fullName The name of the player to get the short username for
* @return The short username or <tt>null</tt> if none was found
* @deprecated Use {@link NameManager#getAccount(String)}
@ -212,6 +220,7 @@ public class NameManager {
/**
* Store the username of a player into the database and the username-uuid cache
*
* @param player The data transfer object of the player to store
*/
public static void storeUsername(final PlayerDTO player) {
@ -243,6 +252,7 @@ public class NameManager {
/**
* Get a new unique shortened name that hasn't been used by another player yet
*
* @param player The player data to get the shortened name for
* @return A new shortened name that hasn't been used before and is a maximum of 15 chars long
*/