mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-10 14:33:08 +00:00
Fixed lots of "warnings", and minor stuff.
Deprecated old Plot Constructor(s)
This commit is contained in:
parent
5f9927cda7
commit
8261b944b2
16 changed files with 148 additions and 69 deletions
|
@ -45,10 +45,11 @@ import java.util.UUID;
|
|||
*
|
||||
* @author Citymonstret
|
||||
*/
|
||||
@SuppressWarnings({"unused", "javadoc", "deprecation"})
|
||||
public class PlotHelper {
|
||||
public static boolean canSetFast = false;
|
||||
public static ArrayList<String> runners_p = new ArrayList<String>();
|
||||
public static HashMap<Plot, Integer> runners = new HashMap<Plot, Integer>();
|
||||
public static ArrayList<String> runners_p = new ArrayList<>();
|
||||
public static HashMap<Plot, Integer> runners = new HashMap<>();
|
||||
static long state = 1;
|
||||
|
||||
/**
|
||||
|
@ -190,7 +191,7 @@ public class PlotHelper {
|
|||
final PlotManager manager = PlotMain.getPlotManager(world);
|
||||
final PlotWorld plotworld = PlotMain.getWorldSettings(world);
|
||||
|
||||
if (lesserPlot.id.x == greaterPlot.id.x) {
|
||||
if (lesserPlot.id.x.equals(greaterPlot.id.x)) {
|
||||
if (!lesserPlot.settings.getMerged(2)) {
|
||||
lesserPlot.settings.setMerged(2, true);
|
||||
greaterPlot.settings.setMerged(0, true);
|
||||
|
@ -208,7 +209,7 @@ public class PlotHelper {
|
|||
/*
|
||||
* Random number gen section
|
||||
*/
|
||||
public static final long nextLong() {
|
||||
public static long nextLong() {
|
||||
final long a = state;
|
||||
state = xorShift64(a);
|
||||
return a;
|
||||
|
@ -218,14 +219,14 @@ public class PlotHelper {
|
|||
* End of random number gen section
|
||||
*/
|
||||
|
||||
public static final long xorShift64(long a) {
|
||||
public static long xorShift64(long a) {
|
||||
a ^= (a << 21);
|
||||
a ^= (a >>> 35);
|
||||
a ^= (a << 4);
|
||||
return a;
|
||||
}
|
||||
|
||||
public static final int random(final int n) {
|
||||
public static int random(final int n) {
|
||||
if (n == 1) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -352,7 +353,6 @@ public class PlotHelper {
|
|||
count++;
|
||||
final PlotId bot = PlayerFunctions.getBottomPlot(world, plot).id;
|
||||
final PlotId top = PlayerFunctions.getTopPlot(world, plot).id;
|
||||
merge = false;
|
||||
plots = PlayerFunctions.getPlotSelectionIds(world, new PlotId(bot.x, bot.y - 1), new PlotId(top.x, top.y));
|
||||
if (ownsPlots(world, plots, player, 0)) {
|
||||
final boolean result = mergePlots(world, plots);
|
||||
|
@ -765,6 +765,7 @@ public class PlotHelper {
|
|||
}
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -794,7 +795,7 @@ public class PlotHelper {
|
|||
}
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue