mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Various fixes and tweaks.
This commit is contained in:
@ -35,7 +35,7 @@ import java.util.UUID;
|
||||
/**
|
||||
* PlotSquared API.
|
||||
*
|
||||
* <p>Useful classes:</p>
|
||||
* <p>Useful classes:
|
||||
* <ul>
|
||||
* <li>{@link BukkitUtil}</li>
|
||||
* <li>{@link PlotPlayer}</li>
|
||||
@ -655,7 +655,7 @@ public class PlotAPI {
|
||||
/**
|
||||
* Get the numbers of plots, which the player is able to build in.
|
||||
*
|
||||
* @param player Player, for whom we're getting the plots
|
||||
* @param player player, for whom we're getting the plots
|
||||
*
|
||||
* @return the number of allowed plots
|
||||
*
|
||||
@ -671,8 +671,8 @@ public class PlotAPI {
|
||||
*
|
||||
* @see PlotPlayer#wrap(Object)
|
||||
*
|
||||
* @param player The player to wrap
|
||||
* @return A PlotPlayer
|
||||
* @param player the player to wrap
|
||||
* @return a {@code PlotPlayer}
|
||||
*/
|
||||
public PlotPlayer wrapPlayer(Player player) {
|
||||
return PlotPlayer.wrap(player);
|
||||
@ -682,12 +682,12 @@ public class PlotAPI {
|
||||
* Get the PlotPlayer for a UUID.
|
||||
*
|
||||
* <p><i>Please note that PlotSquared can be configured to provide
|
||||
* different UUIDs than bukkit</i></p>
|
||||
* different UUIDs than bukkit</i>
|
||||
*
|
||||
* @see PlotPlayer#wrap(Object)
|
||||
*
|
||||
* @param uuid The uuid of the player to wrap
|
||||
* @return A PlotPlayer
|
||||
* @param uuid the uuid of the player to wrap
|
||||
* @return a {@code PlotPlayer}
|
||||
*/
|
||||
public PlotPlayer wrapPlayer(UUID uuid) {
|
||||
return PlotPlayer.wrap(uuid);
|
||||
@ -698,8 +698,8 @@ public class PlotAPI {
|
||||
*
|
||||
* @see PlotPlayer#wrap(Object)
|
||||
*
|
||||
* @param player The player to wrap
|
||||
* @return The PlotPlayer
|
||||
* @param player the player to wrap
|
||||
* @return a {@code PlotPlayer}
|
||||
*/
|
||||
public PlotPlayer wrapPlayer(String player) {
|
||||
return PlotPlayer.wrap(player);
|
||||
@ -707,13 +707,14 @@ public class PlotAPI {
|
||||
|
||||
/**
|
||||
* Get the PlotPlayer for an offline player.
|
||||
*
|
||||
* <p>Note that this will work if the player is offline, however not all
|
||||
* functionality will work</p>
|
||||
* functionality will work.
|
||||
*
|
||||
* @see PlotPlayer#wrap(Object)
|
||||
*
|
||||
* @param player The player to wrap
|
||||
* @return The PlotPlayer
|
||||
* @param player the player to wrap
|
||||
* @return a {@code PlotPlayer}
|
||||
*/
|
||||
public PlotPlayer wrapPlayer(OfflinePlayer player) {
|
||||
return PlotPlayer.wrap(player);
|
||||
|
@ -70,7 +70,7 @@ import com.plotsquared.bukkit.uuid.FileUUIDHandler;
|
||||
import com.plotsquared.bukkit.uuid.LowerOfflineUUIDWrapper;
|
||||
import com.plotsquared.bukkit.uuid.OfflineUUIDWrapper;
|
||||
import com.plotsquared.bukkit.uuid.SQLUUIDHandler;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Chunk;
|
||||
@ -95,7 +95,7 @@ import java.util.UUID;
|
||||
|
||||
public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
|
||||
public static WorldEditPlugin worldEdit;
|
||||
public static WorldEdit worldEdit;
|
||||
|
||||
private int[] version;
|
||||
|
||||
@ -385,7 +385,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
@Override
|
||||
public boolean initWorldEdit() {
|
||||
if (getServer().getPluginManager().getPlugin("WorldEdit") != null) {
|
||||
worldEdit = (WorldEditPlugin) getServer().getPluginManager().getPlugin("WorldEdit");
|
||||
worldEdit = WorldEdit.getInstance();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -9,9 +9,9 @@ import java.util.Collection;
|
||||
/**
|
||||
* Represents a wrapper around an array class of an arbitrary reference type,
|
||||
* which properly implements "value" hash code and equality functions.
|
||||
* <p>
|
||||
* This class is intended for use as a key to a map.
|
||||
* </p>
|
||||
*
|
||||
* <p>This class is intended for use as a key to a map.
|
||||
*
|
||||
* @author Glen Husman
|
||||
* @param <E> The type of elements in the array.
|
||||
* @see Arrays
|
||||
|
@ -109,6 +109,7 @@ import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.projectiles.BlockProjectileSource;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
@ -303,7 +304,6 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
return true;
|
||||
}
|
||||
Plot plot = area.getPlotAbs(loc);
|
||||
//
|
||||
ProjectileSource shooter = entity.getShooter();
|
||||
if (shooter instanceof Player) {
|
||||
PlotPlayer pp = BukkitUtil.getPlayer((Player) shooter);
|
||||
@ -780,7 +780,6 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
return;
|
||||
}
|
||||
Plot plot = area.getOwnedPlot(location);
|
||||
Optional<Boolean> flag;
|
||||
switch (block.getType()) {
|
||||
case GRASS:
|
||||
if (Flags.GRASS_GROW.isFalse(plot)) {
|
||||
|
@ -10,8 +10,8 @@ public class BukkitOfflinePlayer implements OfflinePlotPlayer {
|
||||
public final OfflinePlayer player;
|
||||
|
||||
/**
|
||||
* <p>Please do not use this method. Instead use BukkitUtil.getPlayer(Player),
|
||||
* as it caches player objects.</p>
|
||||
* Please do not use this method. Instead use BukkitUtil.getPlayer(Player),
|
||||
* as it caches player objects.
|
||||
*
|
||||
* @param player
|
||||
*/
|
||||
|
Reference in New Issue
Block a user