mirror of
				https://e.coding.net/circlecloud/YumCore.git
				synced 2025-11-03 23:06:02 +00:00 
			
		
		
		
	@@ -1,4 +1,4 @@
 | 
				
			|||||||
package pw.yumc.YumCore.plugin.playerpoint;
 | 
					package pw.yumc.YumCore.plugin.playerpoints;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.black_ixx.playerpoints.PlayerPoints;
 | 
					import org.black_ixx.playerpoints.PlayerPoints;
 | 
				
			||||||
import org.black_ixx.playerpoints.PlayerPointsAPI;
 | 
					import org.black_ixx.playerpoints.PlayerPointsAPI;
 | 
				
			||||||
@@ -8,7 +8,7 @@ import org.bukkit.plugin.Plugin;
 | 
				
			|||||||
import pw.yumc.YumCore.kit.PKit;
 | 
					import pw.yumc.YumCore.kit.PKit;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@SuppressWarnings("deprecation")
 | 
					@SuppressWarnings("deprecation")
 | 
				
			||||||
public class PPAPI {
 | 
					public class PointAPI {
 | 
				
			||||||
    private static PlayerPointsAPI api;
 | 
					    private static PlayerPointsAPI api;
 | 
				
			||||||
    static {
 | 
					    static {
 | 
				
			||||||
        Plugin pp = Bukkit.getServer().getPluginManager().getPlugin("PlayerPoints");
 | 
					        Plugin pp = Bukkit.getServer().getPluginManager().getPlugin("PlayerPoints");
 | 
				
			||||||
@@ -28,7 +28,7 @@ public class PPAPI {
 | 
				
			|||||||
     *            数量
 | 
					     *            数量
 | 
				
			||||||
     * @return 是否成功
 | 
					     * @return 是否成功
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean add(String player, int amount) {
 | 
					    public static boolean add(String player, int amount) {
 | 
				
			||||||
        return api.give(player, amount);
 | 
					        return api.give(player, amount);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -41,7 +41,7 @@ public class PPAPI {
 | 
				
			|||||||
     *            数量
 | 
					     *            数量
 | 
				
			||||||
     * @return 是否有
 | 
					     * @return 是否有
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean has(String player, int amount) {
 | 
					    public static boolean has(String player, int amount) {
 | 
				
			||||||
        return api.look(player) >= amount;
 | 
					        return api.look(player) >= amount;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -54,7 +54,7 @@ public class PPAPI {
 | 
				
			|||||||
     *            数量
 | 
					     *            数量
 | 
				
			||||||
     * @return 是否成功
 | 
					     * @return 是否成功
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean remove(String player, int amount) {
 | 
					    public static boolean remove(String player, int amount) {
 | 
				
			||||||
        return api.take(player, amount);
 | 
					        return api.take(player, amount);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -67,7 +67,7 @@ public class PPAPI {
 | 
				
			|||||||
     *            数量
 | 
					     *            数量
 | 
				
			||||||
     * @return 是否成功
 | 
					     * @return 是否成功
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean add(OfflinePlayer player, int amount) {
 | 
					    public static boolean add(OfflinePlayer player, int amount) {
 | 
				
			||||||
        return api.give(player.getUniqueId(), amount);
 | 
					        return api.give(player.getUniqueId(), amount);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -80,7 +80,7 @@ public class PPAPI {
 | 
				
			|||||||
     *            数量
 | 
					     *            数量
 | 
				
			||||||
     * @return 是否有
 | 
					     * @return 是否有
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean has(OfflinePlayer player, int amount) {
 | 
					    public static boolean has(OfflinePlayer player, int amount) {
 | 
				
			||||||
        return api.look(player.getUniqueId()) >= amount;
 | 
					        return api.look(player.getUniqueId()) >= amount;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -93,7 +93,7 @@ public class PPAPI {
 | 
				
			|||||||
     *            数量
 | 
					     *            数量
 | 
				
			||||||
     * @return 是否成功
 | 
					     * @return 是否成功
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean remove(OfflinePlayer player, int amount) {
 | 
					    public static boolean remove(OfflinePlayer player, int amount) {
 | 
				
			||||||
        return api.take(player.getUniqueId(), amount);
 | 
					        return api.take(player.getUniqueId(), amount);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user