Cleaned up code, updated copyright at long last.

This commit is contained in:
Jikoo 2018-02-04 10:29:07 -05:00
parent eaf01fa32c
commit 50c45b6616
165 changed files with 1603 additions and 921 deletions

View file

@ -140,7 +140,7 @@ The final file is target/OpenInv.jar
## License ## License
``` ```
Copyright (C) 2011-2014 lishid. All rights reserved. Copyright (C) 2011-2018 lishid. All rights reserved.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,3 +1,19 @@
/*
* Copyright (C) 2011-2018 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.lishid.openinv; package com.lishid.openinv;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -26,7 +42,7 @@ public interface IOpenInv {
* *
* @return false unless configured otherwise * @return false unless configured otherwise
*/ */
public boolean disableSaving(); boolean disableSaving();
/** /**
* Gets the active ISilentContainer implementation. May return null if the server version is * Gets the active ISilentContainer implementation. May return null if the server version is
@ -35,7 +51,7 @@ public interface IOpenInv {
* @return the ISilentContainer * @return the ISilentContainer
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public IAnySilentContainer getAnySilentContainer(); IAnySilentContainer getAnySilentContainer();
/** /**
* Gets an ISpecialEnderChest for the given Player. Returns null if the ISpecialEnderChest could * Gets an ISpecialEnderChest for the given Player. Returns null if the ISpecialEnderChest could
@ -49,7 +65,7 @@ public interface IOpenInv {
*/ */
@Deprecated @Deprecated
@Nullable @Nullable
public ISpecialEnderChest getEnderChest(Player player, boolean online); ISpecialEnderChest getEnderChest(Player player, boolean online);
/** /**
* Gets an ISpecialPlayerInventory for the given Player. Returns null if the * Gets an ISpecialPlayerInventory for the given Player. Returns null if the
@ -63,7 +79,7 @@ public interface IOpenInv {
*/ */
@Deprecated @Deprecated
@Nullable @Nullable
public ISpecialPlayerInventory getInventory(Player player, boolean online); ISpecialPlayerInventory getInventory(Player player, boolean online);
/** /**
* Gets the active IInventoryAccess implementation. May return null if the server version is * Gets the active IInventoryAccess implementation. May return null if the server version is
@ -72,7 +88,7 @@ public interface IOpenInv {
* @return the IInventoryAccess * @return the IInventoryAccess
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public IInventoryAccess getInventoryAccess(); IInventoryAccess getInventoryAccess();
/** /**
* Gets the provided player's AnyChest setting. * Gets the provided player's AnyChest setting.
@ -81,7 +97,7 @@ public interface IOpenInv {
* @return true if AnyChest is enabled * @return true if AnyChest is enabled
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public boolean getPlayerAnyChestStatus(OfflinePlayer player); boolean getPlayerAnyChestStatus(OfflinePlayer player);
/** /**
* Gets a unique identifier by which the OfflinePlayer can be referenced. Using the value * Gets a unique identifier by which the OfflinePlayer can be referenced. Using the value
@ -91,7 +107,7 @@ public interface IOpenInv {
* @return the identifier * @return the identifier
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public String getPlayerID(OfflinePlayer offline); String getPlayerID(OfflinePlayer offline);
/** /**
* Gets a player's SilentChest setting. * Gets a player's SilentChest setting.
@ -100,7 +116,7 @@ public interface IOpenInv {
* @return true if SilentChest is enabled * @return true if SilentChest is enabled
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public boolean getPlayerSilentChestStatus(OfflinePlayer player); boolean getPlayerSilentChestStatus(OfflinePlayer player);
/** /**
* Gets an ISpecialEnderChest for the given Player. * Gets an ISpecialEnderChest for the given Player.
@ -111,7 +127,7 @@ public interface IOpenInv {
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
* @throws InstantiationException if the ISpecialEnderChest could not be instantiated * @throws InstantiationException if the ISpecialEnderChest could not be instantiated
*/ */
public ISpecialEnderChest getSpecialEnderChest(Player player, boolean online) throws InstantiationException; ISpecialEnderChest getSpecialEnderChest(Player player, boolean online) throws InstantiationException;
/** /**
* Gets an ISpecialPlayerInventory for the given Player. * Gets an ISpecialPlayerInventory for the given Player.
@ -122,14 +138,14 @@ public interface IOpenInv {
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
* @throws InstantiationException if the ISpecialPlayerInventory could not be instantiated * @throws InstantiationException if the ISpecialPlayerInventory could not be instantiated
*/ */
public ISpecialPlayerInventory getSpecialInventory(Player player, boolean online) throws InstantiationException; ISpecialPlayerInventory getSpecialInventory(Player player, boolean online) throws InstantiationException;
/** /**
* Checks if the server version is supported by OpenInv. * Checks if the server version is supported by OpenInv.
* *
* @return true if the server version is supported * @return true if the server version is supported
*/ */
public boolean isSupportedVersion(); boolean isSupportedVersion();
/** /**
* Load a Player from an OfflinePlayer. May return null under some circumstances. * Load a Player from an OfflinePlayer. May return null under some circumstances.
@ -139,7 +155,7 @@ public interface IOpenInv {
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
@Nullable @Nullable
public Player loadPlayer(final OfflinePlayer offline); Player loadPlayer(final OfflinePlayer offline);
/** /**
* Get an OfflinePlayer by name. * Get an OfflinePlayer by name.
@ -152,7 +168,7 @@ public interface IOpenInv {
* @return the OfflinePlayer with the closest matching name or null if no players have ever logged in * @return the OfflinePlayer with the closest matching name or null if no players have ever logged in
*/ */
@Nullable @Nullable
public OfflinePlayer matchPlayer(String name); OfflinePlayer matchPlayer(String name);
/** /**
* Check the configuration value for whether or not OpenInv displays a notification to the user * Check the configuration value for whether or not OpenInv displays a notification to the user
@ -160,7 +176,7 @@ public interface IOpenInv {
* *
* @return true unless configured otherwise * @return true unless configured otherwise
*/ */
public boolean notifyAnyChest(); boolean notifyAnyChest();
/** /**
* Check the configuration value for whether or not OpenInv displays a notification to the user * Check the configuration value for whether or not OpenInv displays a notification to the user
@ -168,7 +184,7 @@ public interface IOpenInv {
* *
* @return true unless configured otherwise * @return true unless configured otherwise
*/ */
public boolean notifySilentChest(); boolean notifySilentChest();
/** /**
* Mark a Player as no longer in use by a Plugin to allow OpenInv to remove it from the cache * Mark a Player as no longer in use by a Plugin to allow OpenInv to remove it from the cache
@ -178,7 +194,7 @@ public interface IOpenInv {
* @param plugin the Plugin no longer holding a reference to the Player * @param plugin the Plugin no longer holding a reference to the Player
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public void releasePlayer(Player player, Plugin plugin); void releasePlayer(Player player, Plugin plugin);
/** /**
* Mark a Player as in use by a Plugin to prevent it from being removed from the cache. Used to * Mark a Player as in use by a Plugin to prevent it from being removed from the cache. Used to
@ -203,7 +219,7 @@ public interface IOpenInv {
* @param plugin the Plugin holding the reference to the Player * @param plugin the Plugin holding the reference to the Player
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public void retainPlayer(Player player, Plugin plugin); void retainPlayer(Player player, Plugin plugin);
/** /**
* Sets a player's AnyChest setting. * Sets a player's AnyChest setting.
@ -212,7 +228,7 @@ public interface IOpenInv {
* @param status the status * @param status the status
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public void setPlayerAnyChestStatus(OfflinePlayer player, boolean status); void setPlayerAnyChestStatus(OfflinePlayer player, boolean status);
/** /**
* Sets a player's SilentChest setting. * Sets a player's SilentChest setting.
@ -221,7 +237,7 @@ public interface IOpenInv {
* @param status the status * @param status the status
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public void setPlayerSilentChestStatus(OfflinePlayer player, boolean status); void setPlayerSilentChestStatus(OfflinePlayer player, boolean status);
/** /**
* Forcibly unload a cached Player's data. * Forcibly unload a cached Player's data.
@ -229,6 +245,6 @@ public interface IOpenInv {
* @param player the OfflinePlayer to unload * @param player the OfflinePlayer to unload
* @throws IllegalStateException if the server version is unsupported * @throws IllegalStateException if the server version is unsupported
*/ */
public void unload(OfflinePlayer player); void unload(OfflinePlayer player);
} }

View file

@ -1,3 +1,19 @@
/*
* Copyright (C) 2011-2018 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.lishid.openinv.internal; package com.lishid.openinv.internal;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -15,14 +31,14 @@ public interface IAnySilentContainer {
* @param block the Block * @param block the Block
* @return true if the container can be opened * @return true if the container can be opened
*/ */
public boolean activateContainer(Player player, boolean silentchest, Block block); boolean activateContainer(Player player, boolean silentchest, Block block);
/** /**
* Closes the Player's currently open container silently, if necessary. * Closes the Player's currently open container silently, if necessary.
* *
* @param player the Player closing a container * @param player the Player closing a container
*/ */
public void deactivateContainer(Player player); void deactivateContainer(Player player);
/** /**
* Checks if the container at the given coordinates is blocked. * Checks if the container at the given coordinates is blocked.
@ -31,7 +47,7 @@ public interface IAnySilentContainer {
* @param block the Block * @param block the Block
* @return true if the container is blocked * @return true if the container is blocked
*/ */
public boolean isAnyContainerNeeded(Player player, Block block); boolean isAnyContainerNeeded(Player player, Block block);
/** /**
* Checks if the given block is a container which can be unblocked or silenced. * Checks if the given block is a container which can be unblocked or silenced.
@ -39,6 +55,6 @@ public interface IAnySilentContainer {
* @param block the BlockState * @param block the BlockState
* @return true if the Block is a supported container * @return true if the Block is a supported container
*/ */
public boolean isAnySilentContainer(Block block); boolean isAnySilentContainer(Block block);
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public interface IInventoryAccess {
* @return the ISpecialEnderChest or null * @return the ISpecialEnderChest or null
*/ */
@Nullable @Nullable
public ISpecialEnderChest getSpecialEnderChest(Inventory inventory); ISpecialEnderChest getSpecialEnderChest(Inventory inventory);
/** /**
* Gets an ISpecialPlayerInventory from an Inventory or null if the Inventory is not backed by * Gets an ISpecialPlayerInventory from an Inventory or null if the Inventory is not backed by
@ -40,7 +40,7 @@ public interface IInventoryAccess {
* @return the ISpecialPlayerInventory or null * @return the ISpecialPlayerInventory or null
*/ */
@Nullable @Nullable
public ISpecialPlayerInventory getSpecialPlayerInventory(Inventory inventory); ISpecialPlayerInventory getSpecialPlayerInventory(Inventory inventory);
/** /**
* Check if an Inventory is an ISpecialEnderChest implementation. * Check if an Inventory is an ISpecialEnderChest implementation.
@ -48,7 +48,7 @@ public interface IInventoryAccess {
* @param inventory the Inventory * @param inventory the Inventory
* @return true if the Inventory is backed by an ISpecialEnderChest * @return true if the Inventory is backed by an ISpecialEnderChest
*/ */
public boolean isSpecialEnderChest(Inventory inventory); boolean isSpecialEnderChest(Inventory inventory);
/** /**
* Check if an Inventory is an ISpecialPlayerInventory implementation. * Check if an Inventory is an ISpecialPlayerInventory implementation.
@ -56,6 +56,6 @@ public interface IInventoryAccess {
* @param inventory the Inventory * @param inventory the Inventory
* @return true if the Inventory is backed by an ISpecialPlayerInventory * @return true if the Inventory is backed by an ISpecialPlayerInventory
*/ */
public boolean isSpecialPlayerInventory(Inventory inventory); boolean isSpecialPlayerInventory(Inventory inventory);
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -26,25 +26,25 @@ public interface ISpecialEnderChest {
* *
* @return the Inventory * @return the Inventory
*/ */
public Inventory getBukkitInventory(); Inventory getBukkitInventory();
/** /**
* Sets the Player associated with this ISpecialEnderChest online. * Sets the Player associated with this ISpecialEnderChest online.
* *
* @param player the Player coming online * @param player the Player coming online
*/ */
public void setPlayerOnline(Player player); void setPlayerOnline(Player player);
/** /**
* Sets the Player associated with this ISpecialEnderChest offline. * Sets the Player associated with this ISpecialEnderChest offline.
*/ */
public void setPlayerOffline(); void setPlayerOffline();
/** /**
* Gets whether or not this ISpecialEnderChest is in use. * Gets whether or not this ISpecialEnderChest is in use.
* *
* @return true if the ISpecialEnderChest is in use * @return true if the ISpecialEnderChest is in use
*/ */
public boolean isInUse(); boolean isInUse();
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -26,25 +26,25 @@ public interface ISpecialPlayerInventory {
* *
* @return the Inventory * @return the Inventory
*/ */
public Inventory getBukkitInventory(); Inventory getBukkitInventory();
/** /**
* Sets the Player associated with this ISpecialPlayerInventory online. * Sets the Player associated with this ISpecialPlayerInventory online.
* *
* @param player the Player coming online * @param player the Player coming online
*/ */
public void setPlayerOnline(Player player); void setPlayerOnline(Player player);
/** /**
* Sets the Player associated with this ISpecialPlayerInventory offline. * Sets the Player associated with this ISpecialPlayerInventory offline.
*/ */
public void setPlayerOffline(); void setPlayerOffline();
/** /**
* Gets whether or not this ISpecialPlayerInventory is in use. * Gets whether or not this ISpecialPlayerInventory is in use.
* *
* @return true if the ISpecialPlayerInventory is in use * @return true if the ISpecialPlayerInventory is in use
*/ */
public boolean isInUse(); boolean isInUse();
} }

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -28,18 +28,18 @@ public interface IPlayerDataManager {
* </p> * </p>
* This method is potentially blocking, and should not be called on the main thread. * This method is potentially blocking, and should not be called on the main thread.
* *
* @param offline * @param offline the OfflinePlayer
* @return * @return the Player loaded
*/ */
public Player loadPlayer(OfflinePlayer offline); Player loadPlayer(OfflinePlayer offline);
/** /**
* Gets a unique identifying string for an OfflinePlayer. * Gets a unique identifying string for an OfflinePlayer.
* *
* @param player * @param offline the OfflinePlayer
* @return * @return the unique identifier
*/ */
public String getPlayerDataID(OfflinePlayer player); String getPlayerDataID(OfflinePlayer offline);
/** /**
* Gets an OfflinePlayer by the given unique identifier. * Gets an OfflinePlayer by the given unique identifier.
@ -47,13 +47,13 @@ public interface IPlayerDataManager {
* @param identifier the unique identifier * @param identifier the unique identifier
* @return the OfflinePlayer, or null if no exact match was found * @return the OfflinePlayer, or null if no exact match was found
*/ */
public OfflinePlayer getPlayerByID(String identifier); OfflinePlayer getPlayerByID(String identifier);
/** /**
* Gets a Collection of all Players currently online. * Gets a Collection of all Players currently online.
* *
* @return the Collection of Players * @return the Collection of Players
*/ */
public Collection<? extends Player> getOnlinePlayers(); Collection<? extends Player> getOnlinePlayers();
} }

View file

@ -1,3 +1,19 @@
/*
* Copyright (C) 2011-2018 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.lishid.openinv.util; package com.lishid.openinv.util;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,3 +1,19 @@
/*
* Copyright (C) 2011-2018 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.lishid.openinv.util; package com.lishid.openinv.util;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -108,9 +108,7 @@ public class InternalAccessor {
for (Object object : params) { for (Object object : params) {
builder.append(object.getClass().getName()).append(", "); builder.append(object.getClass().getName()).append(", ");
} }
if (params.length > 0) {
builder.delete(builder.length() - 2, builder.length()); builder.delete(builder.length() - 2, builder.length());
}
String message = builder.append(']').toString(); String message = builder.append(']').toString();
this.plugin.getLogger().warning(message); this.plugin.getLogger().warning(message);

View file

@ -1,3 +1,19 @@
/*
* Copyright (C) 2011-2018 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.lishid.openinv.util; package com.lishid.openinv.util;
import org.bukkit.permissions.Permissible; import org.bukkit.permissions.Permissible;

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_4_5.IInventory;
import net.minecraft.server.v1_4_5.ItemStack; import net.minecraft.server.v1_4_5.ItemStack;
import net.minecraft.server.v1_4_5.PlayerInventory; import net.minecraft.server.v1_4_5.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,13 +42,14 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
public SpecialEnderChest(Player player, Boolean online) { public SpecialEnderChest(Player player, Boolean online) {
super(((CraftPlayer) player).getHandle().getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
((CraftPlayer) player).getHandle().getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_4_6.IInventory;
import net.minecraft.server.v1_4_6.ItemStack; import net.minecraft.server.v1_4_6.ItemStack;
import net.minecraft.server.v1_4_6.PlayerInventory; import net.minecraft.server.v1_4_6.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,13 +42,14 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
public SpecialEnderChest(Player player, Boolean online) { public SpecialEnderChest(Player player, Boolean online) {
super(((CraftPlayer) player).getHandle().getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
((CraftPlayer) player).getHandle().getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,4 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?> <!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<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"> <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>
@ -44,7 +59,6 @@
<module>v1_6_R1</module> <module>v1_6_R1</module>
<module>v1_6_R2</module> <module>v1_6_R2</module>
<module>v1_6_R3</module> <module>v1_6_R3</module>
<!-- TODO: Recompile CB for 1_7_R1 through 1_7_R4, currently using whatever jars worked -->
<module>v1_7_R1</module> <module>v1_7_R1</module>
<module>v1_7_R2</module> <module>v1_7_R2</module>
<module>v1_7_R3</module> <module>v1_7_R3</module>

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -61,8 +61,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getUniqueId().toString(); return offline.getUniqueId().toString();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,12 +36,13 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialEnderChest(Player player, Boolean online) { public SpecialEnderChest(Player player, Boolean online) {
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().hasCustomName(), PlayerDataManager.getHandle(player).getEnderChest().hasCustomName(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.bukkitOwner = nmsPlayer.getBukkitEntity(); this.bukkitOwner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -34,7 +34,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[4]; private final ItemStack[] extra = new ItemStack[4];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));
@ -286,6 +286,11 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return player.getName(); return player.getName();
} }
@Override
public boolean hasCustomName() {
return true;
}
@Override @Override
public boolean a(EntityHuman entityhuman) { public boolean a(EntityHuman entityhuman) {
return true; return true;

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -61,8 +61,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getUniqueId().toString(); return offline.getUniqueId().toString();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -37,12 +37,13 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialEnderChest(Player player, Boolean online) { public SpecialEnderChest(Player player, Boolean online) {
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().hasCustomName(), PlayerDataManager.getHandle(player).getEnderChest().hasCustomName(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.bukkitOwner = nmsPlayer.getBukkitEntity(); this.bukkitOwner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,7 +36,7 @@ import org.bukkit.craftbukkit.v1_11_R1.inventory.CraftInventory;
public class SpecialPlayerInventory extends PlayerInventory implements ISpecialPlayerInventory { public class SpecialPlayerInventory extends PlayerInventory implements ISpecialPlayerInventory {
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));
@ -70,7 +70,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
field = PlayerInventory.class.getDeclaredField("g"); field = PlayerInventory.class.getDeclaredField("g");
field.setAccessible(true); field.setAccessible(true);
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL); modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(inventory, Arrays.asList(new NonNullList[] { items, armor, extraSlots })); field.set(inventory, Arrays.asList(items, armor, extraSlots));
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
// Unable to set final fields to item arrays, we're screwed. Noisily fail. // Unable to set final fields to item arrays, we're screwed. Noisily fail.
e.printStackTrace(); e.printStackTrace();
@ -89,7 +89,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
@Override @Override
public void setPlayerOnline(Player player) { public void setPlayerOnline(Player player) {
if (!playerOnline) { if (!playerOnline) {
this.player = PlayerDataManager.getHandle(player);; this.player = PlayerDataManager.getHandle(player);
setItemArrays(this.player.inventory, items, armor, extraSlots); setItemArrays(this.player.inventory, items, armor, extraSlots);
playerOnline = true; playerOnline = true;
} }
@ -157,7 +157,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return ItemStack.a; return ItemStack.a;
} }
return list == null || list.get(i).isEmpty() ? ItemStack.a : ContainerUtil.a(list, i, j); return list.get(i).isEmpty() ? ItemStack.a : ContainerUtil.a(list, i, j);
} }
@Override @Override
@ -182,7 +182,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return ItemStack.a; return ItemStack.a;
} }
if (list != null && !list.get(i).isEmpty()) { if (!list.get(i).isEmpty()) {
ItemStack itemstack = list.get(i); ItemStack itemstack = list.get(i);
list.set(i, ItemStack.a); list.set(i, ItemStack.a);
@ -215,10 +215,8 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return; return;
} }
if (list != null) {
list.set(i, itemstack); list.set(i, itemstack);
} }
}
private int getReversedItemSlotNum(int i) { private int getReversedItemSlotNum(int i) {
if (i >= 27) { if (i >= 27) {
@ -251,6 +249,11 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return player.getName(); return player.getName();
} }
@Override
public boolean hasCustomName() {
return true;
}
@Override @Override
public boolean a(EntityHuman entityhuman) { public boolean a(EntityHuman entityhuman) {
return true; return true;

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,11 +1,17 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. This program is free software: you can * Copyright (C) 2011-2018 lishid. All rights reserved.
* redistribute it and/or modify it under the terms of the GNU General Public License as published *
* by the Free Software Foundation, version 3. This program is distributed in the hope that it will * This program is free software: you can redistribute it and/or modify
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * it under the terms of the GNU General Public License as published by
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should * the Free Software Foundation, version 3.
* have received a copy of the GNU General Public License along with this program. If not, see *
* <http://www.gnu.org/licenses/>. * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.lishid.openinv.internal.v1_12_R1; package com.lishid.openinv.internal.v1_12_R1;

View file

@ -1,11 +1,17 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. This program is free software: you can * Copyright (C) 2011-2018 lishid. All rights reserved.
* redistribute it and/or modify it under the terms of the GNU General Public License as published *
* by the Free Software Foundation, version 3. This program is distributed in the hope that it will * This program is free software: you can redistribute it and/or modify
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * it under the terms of the GNU General Public License as published by
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should * the Free Software Foundation, version 3.
* have received a copy of the GNU General Public License along with this program. If not, see *
* <http://www.gnu.org/licenses/>. * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.lishid.openinv.internal.v1_12_R1; package com.lishid.openinv.internal.v1_12_R1;
@ -74,8 +80,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(final OfflinePlayer player) { public String getPlayerDataID(final OfflinePlayer offline) {
return player.getUniqueId().toString(); return offline.getUniqueId().toString();
} }
@Override @Override

View file

@ -1,11 +1,17 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. This program is free software: you can * Copyright (C) 2011-2018 lishid. All rights reserved.
* redistribute it and/or modify it under the terms of the GNU General Public License as published *
* by the Free Software Foundation, version 3. This program is distributed in the hope that it will * This program is free software: you can redistribute it and/or modify
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * it under the terms of the GNU General Public License as published by
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should * the Free Software Foundation, version 3.
* have received a copy of the GNU General Public License along with this program. If not, see *
* <http://www.gnu.org/licenses/>. * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.lishid.openinv.internal.v1_12_R1; package com.lishid.openinv.internal.v1_12_R1;
@ -32,12 +38,13 @@ public class SpecialEnderChest extends InventorySubcontainer
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialEnderChest(final Player player, final Boolean online) { public SpecialEnderChest(final Player player, final Boolean online) {
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().hasCustomName(), PlayerDataManager.getHandle(player).getEnderChest().hasCustomName(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.bukkitOwner = nmsPlayer.getBukkitEntity(); this.bukkitOwner = nmsPlayer.getBukkitEntity();
@ -64,13 +71,8 @@ public class SpecialEnderChest extends InventorySubcontainer
Field field = InventorySubcontainer.class.getField("items"); Field field = InventorySubcontainer.class.getField("items");
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL); modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(subcontainer, list); field.set(subcontainer, list);
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException | SecurityException | IllegalArgumentException
e.printStackTrace(); | IllegalAccessException e) {
} catch (SecurityException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }

View file

@ -1,11 +1,17 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. This program is free software: you can * Copyright (C) 2011-2018 lishid. All rights reserved.
* redistribute it and/or modify it under the terms of the GNU General Public License as published *
* by the Free Software Foundation, version 3. This program is distributed in the hope that it will * This program is free software: you can redistribute it and/or modify
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * it under the terms of the GNU General Public License as published by
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should * the Free Software Foundation, version 3.
* have received a copy of the GNU General Public License along with this program. If not, see *
* <http://www.gnu.org/licenses/>. * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.lishid.openinv.internal.v1_12_R1; package com.lishid.openinv.internal.v1_12_R1;
@ -30,7 +36,7 @@ import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventory;
public class SpecialPlayerInventory extends PlayerInventory implements ISpecialPlayerInventory { public class SpecialPlayerInventory extends PlayerInventory implements ISpecialPlayerInventory {
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(final Player bukkitPlayer, final Boolean online) { public SpecialPlayerInventory(final Player bukkitPlayer, final Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));
@ -82,6 +88,11 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return this.player.getName(); return this.player.getName();
} }
@Override
public boolean hasCustomName() {
return true;
}
private int getReversedArmorSlotNum(final int i) { private int getReversedArmorSlotNum(final int i) {
if (i == 0) { if (i == 0) {
return 3; return 3;
@ -138,10 +149,8 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return; return;
} }
if (list != null) {
list.set(i, itemstack); list.set(i, itemstack);
} }
}
private void setItemArrays(final PlayerInventory inventory, final NonNullList<ItemStack> items, private void setItemArrays(final PlayerInventory inventory, final NonNullList<ItemStack> items,
final NonNullList<ItemStack> armor, final NonNullList<ItemStack> extraSlots) { final NonNullList<ItemStack> armor, final NonNullList<ItemStack> extraSlots) {
@ -169,14 +178,10 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
field = PlayerInventory.class.getDeclaredField("f"); field = PlayerInventory.class.getDeclaredField("f");
field.setAccessible(true); field.setAccessible(true);
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL); modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(inventory, Arrays.asList(new NonNullList[] { items, armor, extraSlots })); field.set(inventory, Arrays.asList(items, armor, extraSlots));
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
// Unable to set final fields to item lists, we're screwed. Noisily fail. // Unable to set final fields to item lists, we're screwed. Noisily fail.
e.printStackTrace(); e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} }
} }
@ -189,7 +194,6 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
public void setPlayerOnline(final Player player) { public void setPlayerOnline(final Player player) {
if (!this.playerOnline) { if (!this.playerOnline) {
this.player = PlayerDataManager.getHandle(player); this.player = PlayerDataManager.getHandle(player);
;
this.setItemArrays(this.player.inventory, this.items, this.armor, this.extraSlots); this.setItemArrays(this.player.inventory, this.items, this.armor, this.extraSlots);
this.playerOnline = true; this.playerOnline = true;
} }
@ -217,7 +221,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return ItemStack.a; return ItemStack.a;
} }
return list == null || list.get(i).isEmpty() ? ItemStack.a : ContainerUtil.a(list, i, j); return list.get(i).isEmpty() ? ItemStack.a : ContainerUtil.a(list, i, j);
} }
@Override @Override
@ -242,7 +246,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
return ItemStack.a; return ItemStack.a;
} }
if (list != null && !list.get(i).isEmpty()) { if (!list.get(i).isEmpty()) {
ItemStack itemstack = list.get(i); ItemStack itemstack = list.get(i);
list.set(i, ItemStack.a); list.set(i, ItemStack.a);

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -60,8 +60,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_4_R1.IInventory;
import net.minecraft.server.v1_4_R1.ItemStack; import net.minecraft.server.v1_4_R1.ItemStack;
import net.minecraft.server.v1_4_R1.PlayerInventory; import net.minecraft.server.v1_4_R1.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,13 +42,14 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
public SpecialEnderChest(Player player, Boolean online) { public SpecialEnderChest(Player player, Boolean online) {
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_5_R2.IInventory;
import net.minecraft.server.v1_5_R2.ItemStack; import net.minecraft.server.v1_5_R2.ItemStack;
import net.minecraft.server.v1_5_R2.PlayerInventory; import net.minecraft.server.v1_5_R2.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
@ -50,6 +50,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().c(), PlayerDataManager.getHandle(player).getEnderChest().c(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_5_R3.IInventory;
import net.minecraft.server.v1_5_R3.ItemStack; import net.minecraft.server.v1_5_R3.ItemStack;
import net.minecraft.server.v1_5_R3.PlayerInventory; import net.minecraft.server.v1_5_R3.PlayerInventory;
public class SilentContainerChest extends ContainerChest { public IInventory inv; class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
@ -50,6 +50,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().c(), PlayerDataManager.getHandle(player).getEnderChest().c(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_6_R1.IInventory;
import net.minecraft.server.v1_6_R1.ItemStack; import net.minecraft.server.v1_6_R1.ItemStack;
import net.minecraft.server.v1_6_R1.PlayerInventory; import net.minecraft.server.v1_6_R1.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
@ -50,6 +50,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().c(), PlayerDataManager.getHandle(player).getEnderChest().c(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_6_R2.IInventory;
import net.minecraft.server.v1_6_R2.ItemStack; import net.minecraft.server.v1_6_R2.ItemStack;
import net.minecraft.server.v1_6_R2.PlayerInventory; import net.minecraft.server.v1_6_R2.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
@ -50,6 +50,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().c(), PlayerDataManager.getHandle(player).getEnderChest().c(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -59,8 +59,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_6_R3.IInventory;
import net.minecraft.server.v1_6_R3.ItemStack; import net.minecraft.server.v1_6_R3.ItemStack;
import net.minecraft.server.v1_6_R3.PlayerInventory; import net.minecraft.server.v1_6_R3.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
@ -50,6 +50,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
super(PlayerDataManager.getHandle(player).getEnderChest().getName(), super(PlayerDataManager.getHandle(player).getEnderChest().getName(),
PlayerDataManager.getHandle(player).getEnderChest().c(), PlayerDataManager.getHandle(player).getEnderChest().c(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -60,8 +60,8 @@ public class PlayerDataManager implements IPlayerDataManager {
} }
@Override @Override
public String getPlayerDataID(OfflinePlayer player) { public String getPlayerDataID(OfflinePlayer offline) {
return player.getName(); return offline.getName();
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -22,7 +22,7 @@ import net.minecraft.server.v1_7_R1.IInventory;
import net.minecraft.server.v1_7_R1.ItemStack; import net.minecraft.server.v1_7_R1.ItemStack;
import net.minecraft.server.v1_7_R1.PlayerInventory; import net.minecraft.server.v1_7_R1.PlayerInventory;
public class SilentContainerChest extends ContainerChest { class SilentContainerChest extends ContainerChest {
public SilentContainerChest(IInventory i1, IInventory i2) { public SilentContainerChest(IInventory i1, IInventory i2) {
super(i1, i2); super(i1, i2);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -42,7 +42,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
private final InventoryEnderChest enderChest; private final InventoryEnderChest enderChest;
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private final List<HumanEntity> transaction = new ArrayList<HumanEntity>(); private final List<HumanEntity> transaction = new ArrayList<HumanEntity>();
private boolean playerOnline = false; private boolean playerOnline;
private CraftPlayer owner; private CraftPlayer owner;
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
@ -50,6 +50,7 @@ public class SpecialEnderChest extends InventorySubcontainer implements IInvento
super(PlayerDataManager.getHandle(player).getEnderChest().getInventoryName(), super(PlayerDataManager.getHandle(player).getEnderChest().getInventoryName(),
PlayerDataManager.getHandle(player).getEnderChest().k_(), PlayerDataManager.getHandle(player).getEnderChest().k_(),
PlayerDataManager.getHandle(player).getEnderChest().getSize()); PlayerDataManager.getHandle(player).getEnderChest().getSize());
this.playerOnline = online;
EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player); EntityPlayer nmsPlayer = PlayerDataManager.getHandle(player);
this.enderChest = nmsPlayer.getEnderChest(); this.enderChest = nmsPlayer.getEnderChest();
this.owner = nmsPlayer.getBukkitEntity(); this.owner = nmsPlayer.getBukkitEntity();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
private final ItemStack[] extra = new ItemStack[5]; private final ItemStack[] extra = new ItemStack[5];
private final CraftInventory inventory = new CraftInventory(this); private final CraftInventory inventory = new CraftInventory(this);
private boolean playerOnline = false; private boolean playerOnline;
public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) { public SpecialPlayerInventory(Player bukkitPlayer, Boolean online) {
super(PlayerDataManager.getHandle(bukkitPlayer)); super(PlayerDataManager.getHandle(bukkitPlayer));

View file

@ -1,3 +1,19 @@
<!--
~ Copyright (C) 2011-2018 lishid. All rights reserved.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2014 lishid. All rights reserved. * Copyright (C) 2011-2018 lishid. All rights reserved.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

Some files were not shown because too many files have changed in this diff Show more