mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 06:34:42 +02:00
Compare commits
34 Commits
6.2.2
...
fix/v6/nul
Author | SHA1 | Date | |
---|---|---|---|
4c166d057e | |||
827f46566c | |||
6f4d2f6d5a | |||
6073b96317 | |||
74a490f9f0 | |||
3a752db698 | |||
7cdde5a822 | |||
8b6e7b2f2b | |||
06f0b42a97 | |||
9a85080bf6 | |||
d14d2caa2d | |||
bcfe7c58dd | |||
289f0f3bfd | |||
6fc4005c72 | |||
8f7c2e4c02 | |||
b43d08f4aa | |||
2c55c6a92e | |||
31f48cc7d1 | |||
4b77f1ab28 | |||
7cc38b5fa8 | |||
0c76d08b10 | |||
9c474570c8 | |||
7e1d56c849 | |||
07d0f124b4 | |||
8d6c621763 | |||
cef7098014 | |||
e1efa7266e | |||
f363941719 | |||
25095f4546 | |||
fd0c2050d8 | |||
07fdc94dd8 | |||
b501a81e21 | |||
eb334b3aac | |||
a77a51b6f2 |
20
.github/workflows/rebase.yml
vendored
Normal file
20
.github/workflows/rebase.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Rebase Pull Request
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rebase:
|
||||||
|
name: Rebase
|
||||||
|
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2.4.0
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.REBASE_TOKEN }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Automatic Rebase
|
||||||
|
uses: cirrus-actions/rebase@1.5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.REBASE_TOKEN }}
|
6
.github/workflows/release-drafter.yml
vendored
6
.github/workflows/release-drafter.yml
vendored
@ -4,11 +4,15 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v6
|
- v6
|
||||||
|
pull_request:
|
||||||
|
types: [ opened, reopened, synchronize ]
|
||||||
|
pull_request_target:
|
||||||
|
types: [ opened, reopened, synchronize ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_release_draft:
|
update_release_draft:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: release-drafter/release-drafter@v5.15.0
|
- uses: release-drafter/release-drafter@v5.17.5
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
4
.lift.toml
Normal file
4
.lift.toml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
jdkVersion = "17"
|
||||||
|
build = "gradle clean build -x test"
|
||||||
|
tools = ["findsecbugs", "ErrorProne", "Semgrep", "Detekt", "Infer"]
|
||||||
|
ignoreRules = ["CatchAndPrintStackTrace", "ReferenceEquality", "FallThrough", "FutureReturnValueIgnored", "MixedMutabilityReturnType", "EmptyCatch", "MissingCasesInEnumSwitch", "OperatorPrecedence", "StaticAssignmentInConstructor", "ReferenceEquality", "EqualsHashCode", "EqualsGetClass", "TypeParameterUnusedInFormals"]
|
@ -40,7 +40,6 @@ dependencies {
|
|||||||
compileOnly(libs.placeholderapi)
|
compileOnly(libs.placeholderapi)
|
||||||
compileOnly(libs.luckperms)
|
compileOnly(libs.luckperms)
|
||||||
compileOnly(libs.essentialsx)
|
compileOnly(libs.essentialsx)
|
||||||
compileOnly(libs.hyperverse) { isTransitive = false }
|
|
||||||
compileOnly(libs.mvdwapi) { isTransitive = false }
|
compileOnly(libs.mvdwapi) { isTransitive = false }
|
||||||
|
|
||||||
// Other libraries
|
// Other libraries
|
||||||
@ -75,7 +74,8 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
relocate("org.khelekore.prtree", "com.plotsquared.prtree")
|
relocate("org.khelekore.prtree", "com.plotsquared.prtree")
|
||||||
relocate("com.google.inject", "com.plotsquared.google")
|
relocate("com.google.inject", "com.plotsquared.google")
|
||||||
relocate("org.aopalliance", "com.plotsquared.core.aopalliance")
|
relocate("org.aopalliance", "com.plotsquared.core.aopalliance")
|
||||||
relocate("com.intellectualsites.services", "com.plotsquared.core.services")
|
relocate("cloud.commandframework.services", "com.plotsquared.core.services")
|
||||||
|
relocate("io.leangen.geantyref", "com.plotsquared.core.geantyref")
|
||||||
relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
|
relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
|
||||||
relocate("com.intellectualsites.http", "com.plotsquared.core.http")
|
relocate("com.intellectualsites.http", "com.plotsquared.core.http")
|
||||||
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
|
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
|
||||||
@ -83,6 +83,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
relocate("org.jetbrains", "com.plotsquared.core.annotations")
|
relocate("org.jetbrains", "com.plotsquared.core.annotations")
|
||||||
relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
|
relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
|
||||||
relocate("javax.annotation", "com.plotsquared.core.annotation")
|
relocate("javax.annotation", "com.plotsquared.core.annotation")
|
||||||
|
relocate("com.google.code.findbugs", "com.plotsquared.core.findbugs")
|
||||||
relocate("javax.inject", "com.plotsquared.core.annotation.inject")
|
relocate("javax.inject", "com.plotsquared.core.annotation.inject")
|
||||||
|
|
||||||
// Get rid of all the libs which are 100% unused.
|
// Get rid of all the libs which are 100% unused.
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -147,6 +147,8 @@ import java.io.File;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -216,6 +218,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
private PlatformWorldManager<World> worldManager;
|
private PlatformWorldManager<World> worldManager;
|
||||||
private Locale serverLocale;
|
private Locale serverLocale;
|
||||||
|
|
||||||
|
@SuppressWarnings("StringSplitter")
|
||||||
@Override
|
@Override
|
||||||
public int @NonNull [] serverVersion() {
|
public int @NonNull [] serverVersion() {
|
||||||
if (this.version == null) {
|
if (this.version == null) {
|
||||||
@ -266,7 +269,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
faweHook = true;
|
faweHook = true;
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" +
|
LOGGER.error("Incompatible version of FAWE to enable hook, please upgrade: https://ci.athion" +
|
||||||
".net/job/FastAsyncWorldEdit-1.17/");
|
".net/job/FastAsyncWorldEdit/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -968,7 +971,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
}
|
}
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
entity.remove();
|
entity.remove();
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -980,7 +982,6 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
}
|
}
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
entity.remove();
|
entity.remove();
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1141,8 +1142,10 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
@Override
|
@Override
|
||||||
public @NonNull String pluginsFormatted() {
|
public @NonNull String pluginsFormatted() {
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
Plugin[] plugins = Bukkit.getServer().getPluginManager().getPlugins();
|
List<Plugin> plugins = new ArrayList<>();
|
||||||
msg.append("Plugins (").append(plugins.length).append("): \n");
|
Collections.addAll(plugins, Bukkit.getServer().getPluginManager().getPlugins());
|
||||||
|
plugins.sort(Comparator.comparing(Plugin::getName));
|
||||||
|
msg.append("Plugins (").append(plugins.size()).append("): \n");
|
||||||
for (Plugin p : plugins) {
|
for (Plugin p : plugins) {
|
||||||
msg.append(" - ").append(p.getName()).append(":").append("\n")
|
msg.append(" - ").append(p.getName()).append(":").append("\n")
|
||||||
.append(" • Version: ").append(p.getDescription().getVersion()).append("\n")
|
.append(" • Version: ").append(p.getDescription().getVersion()).append("\n")
|
||||||
@ -1156,6 +1159,21 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
return msg.toString();
|
return msg.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
|
public @NonNull String worldEditImplementations() {
|
||||||
|
StringBuilder msg = new StringBuilder();
|
||||||
|
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
|
||||||
|
msg.append("FastAsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit").getDescription().getVersion());
|
||||||
|
} else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
|
||||||
|
msg.append("AsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("AsyncWorldEdit").getDescription().getVersion()).append("\n");
|
||||||
|
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||||
|
} else {
|
||||||
|
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||||
|
}
|
||||||
|
return msg.toString();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public com.plotsquared.core.location.@NonNull World<?> getPlatformWorld(final @NonNull String worldName) {
|
public com.plotsquared.core.location.@NonNull World<?> getPlatformWorld(final @NonNull String worldName) {
|
||||||
return BukkitWorld.of(worldName);
|
return BukkitWorld.of(worldName);
|
||||||
@ -1204,7 +1222,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NonNull
|
@NonNull
|
||||||
@SuppressWarnings("ALL")
|
@SuppressWarnings("unchecked")
|
||||||
public PlayerManager<? extends PlotPlayer<Player>, ? extends Player> playerManager() {
|
public PlayerManager<? extends PlotPlayer<Player>, ? extends Player> playerManager() {
|
||||||
return (PlayerManager<BukkitPlayer, Player>) injector().getInstance(PlayerManager.class);
|
return (PlayerManager<BukkitPlayer, Player>) injector().getInstance(PlayerManager.class);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -461,6 +461,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
this.tamed.tamed = tamed.isTamed();
|
this.tamed.tamed = tamed.isTamed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Paper deprecation
|
||||||
@Override
|
@Override
|
||||||
public Entity spawn(World world, int xOffset, int zOffset) {
|
public Entity spawn(World world, int xOffset, int zOffset) {
|
||||||
Location location = new Location(world, this.getX() + xOffset, this.getY(), this.z + zOffset);
|
Location location = new Location(world, this.getX() + xOffset, this.getY(), this.z + zOffset);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -29,7 +29,6 @@ import com.google.inject.AbstractModule;
|
|||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
import com.plotsquared.bukkit.managers.BukkitWorldManager;
|
import com.plotsquared.bukkit.managers.BukkitWorldManager;
|
||||||
import com.plotsquared.bukkit.managers.HyperverseWorldManager;
|
|
||||||
import com.plotsquared.bukkit.managers.MultiverseWorldManager;
|
import com.plotsquared.bukkit.managers.MultiverseWorldManager;
|
||||||
import com.plotsquared.core.util.PlatformWorldManager;
|
import com.plotsquared.core.util.PlatformWorldManager;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -37,12 +36,11 @@ import org.bukkit.World;
|
|||||||
|
|
||||||
public class WorldManagerModule extends AbstractModule {
|
public class WorldManagerModule extends AbstractModule {
|
||||||
|
|
||||||
|
@SuppressWarnings("removal") // Internal use only
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
PlatformWorldManager<World> provideWorldManager() {
|
PlatformWorldManager<World> provideWorldManager() {
|
||||||
if (Bukkit.getPluginManager().getPlugin("Hyperverse") != null) {
|
if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
|
||||||
return new HyperverseWorldManager();
|
|
||||||
} else if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null) {
|
|
||||||
return new MultiverseWorldManager();
|
return new MultiverseWorldManager();
|
||||||
} else {
|
} else {
|
||||||
return new BukkitWorldManager();
|
return new BukkitWorldManager();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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,41 +108,11 @@ public class ChunkListener implements Listener {
|
|||||||
this.isTrueForNotSave = false;
|
this.isTrueForNotSave = false;
|
||||||
} else {
|
} else {
|
||||||
this.mustSave = classChunk.getField("mustNotSave");
|
this.mustSave = classChunk.getField("mustNotSave");
|
||||||
/*
|
|
||||||
this.worldServer = classCraftWorld.getField("world");
|
|
||||||
this.methodGetChunkProvider = getRefClass("{nms}.WorldServer").getMethod("getChunkProvider");
|
|
||||||
this.playerChunkMap = getRefClass("{nms}.ChunkProviderServer").getField("playerChunkMap");
|
|
||||||
RefClass classPlayerChunkMap = getRefClass("{nms}.PlayerChunkMap");
|
|
||||||
if (PaperLib.isPaper() && version == 16) {
|
|
||||||
this.updatingChunks = classPlayerChunkMap.getField("updatingChunks");
|
|
||||||
this.methodGetVisibleMap = getRefClass("com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object").getMethod(
|
|
||||||
"getVisibleMap");
|
|
||||||
} else {
|
|
||||||
this.visibleChunks = classPlayerChunkMap.getField("visibleChunks");
|
|
||||||
}
|
|
||||||
this.methodGetFullChunk = getRefClass("{nms}.PlayerChunk").getMethod("getFullChunk");
|
|
||||||
this.methodGetBukkitChunk = getRefClass("{nms}.Chunk").getMethod("getBukkitChunk");
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
} else if (version == 17) {
|
} else {
|
||||||
RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk");
|
RefClass classChunk = getRefClass("net.minecraft.world.level.chunk.Chunk");
|
||||||
this.mustSave = classChunk.getField("mustNotSave");
|
this.mustSave = classChunk.getField("mustNotSave");
|
||||||
/*
|
|
||||||
this.worldServer = classCraftWorld.getField("world");
|
|
||||||
this.methodGetChunkProvider = getRefClass("net.minecraft.server.level.WorldServer").getMethod(
|
|
||||||
"getChunkProvider");
|
|
||||||
this.playerChunkMap = getRefClass("net.minecraft.server.level.ChunkProviderServer").getField("a");
|
|
||||||
RefClass classPlayerChunkMap = getRefClass("net.minecraft.server.level.PlayerChunkMap");
|
|
||||||
if (PaperLib.isPaper()) {
|
|
||||||
this.updatingChunks = classPlayerChunkMap.getField("updatingChunks");
|
|
||||||
this.methodGetVisibleMap = getRefClass("com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object").getMethod(
|
|
||||||
"getVisibleMap");
|
|
||||||
} else {
|
|
||||||
this.visibleChunks = classPlayerChunkMap.getField("l");
|
|
||||||
}
|
|
||||||
this.methodGetFullChunk = getRefClass("net.minecraft.server.level.PlayerChunk").getMethod("getFullChunk");
|
|
||||||
this.methodGetBukkitChunk = getRefClass("net.minecraft.world.level.chunk.Chunk").getMethod("getBukkitChunk");
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (NoSuchFieldException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -182,32 +152,7 @@ public class ChunkListener implements Listener {
|
|||||||
}
|
}
|
||||||
toUnload.add(chunk);
|
toUnload.add(chunk);
|
||||||
}
|
}
|
||||||
}/* else {
|
}
|
||||||
Object worldServer = this.worldServer.of(craftWorld).get();
|
|
||||||
Object chunkProviderServer = methodGetChunkProvider.of(worldServer).call();
|
|
||||||
Object playerChunkMap = this.playerChunkMap.of(chunkProviderServer).get();
|
|
||||||
Long2ObjectLinkedOpenHashMap<?> chunks;
|
|
||||||
if (PaperLib.isPaper() && version > 15) {
|
|
||||||
Object updatingChunks = this.updatingChunks.of(playerChunkMap).get();
|
|
||||||
chunks = (Long2ObjectLinkedOpenHashMap<?>) this.methodGetVisibleMap.of(updatingChunks).call();
|
|
||||||
} else {
|
|
||||||
chunks = (Long2ObjectLinkedOpenHashMap<?>) this.visibleChunks.of(playerChunkMap).get();
|
|
||||||
}
|
|
||||||
for (Object playerChunk : chunks.values()) {
|
|
||||||
Object nmsChunk = this.methodGetFullChunk.of(playerChunk).call();
|
|
||||||
if (nmsChunk == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
Chunk chunk = (Chunk) this.methodGetBukkitChunk.of(nmsChunk).call();
|
|
||||||
int x = chunk.getX();
|
|
||||||
int z = chunk.getZ();
|
|
||||||
if (!shouldSave(worldName, x, z)) {
|
|
||||||
unloadChunk(worldName, chunk, false);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
toUnload.add(chunk);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
if (toUnload.isEmpty()) {
|
if (toUnload.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -48,6 +48,7 @@ import com.plotsquared.core.util.Permissions;
|
|||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
import com.sk89q.worldedit.world.block.BlockType;
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Particle;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Ageable;
|
import org.bukkit.entity.Ageable;
|
||||||
@ -323,6 +324,10 @@ public class EntityEventListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
//Spawn Explosion Particles when enabled in settings
|
||||||
|
if (Settings.General.ALWAYS_SHOW_EXPLOSIONS) {
|
||||||
|
event.getLocation().getWorld().spawnParticle(Particle.EXPLOSION_HUGE, event.getLocation(), 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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,6 @@ import com.plotsquared.core.plot.world.PlotAreaManager;
|
|||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
import org.bukkit.block.Banner;
|
import org.bukkit.block.Banner;
|
||||||
import org.bukkit.block.Beacon;
|
import org.bukkit.block.Beacon;
|
||||||
import org.bukkit.block.Bed;
|
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.CommandBlock;
|
import org.bukkit.block.CommandBlock;
|
||||||
import org.bukkit.block.Comparator;
|
import org.bukkit.block.Comparator;
|
||||||
@ -51,6 +50,7 @@ import org.bukkit.block.Jukebox;
|
|||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.block.Skull;
|
import org.bukkit.block.Skull;
|
||||||
import org.bukkit.block.Structure;
|
import org.bukkit.block.Structure;
|
||||||
|
import org.bukkit.block.data.type.Bed;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -68,11 +68,9 @@ import com.plotsquared.core.plot.flag.implementations.PlayerInteractFlag;
|
|||||||
import com.plotsquared.core.plot.flag.implementations.PreventCreativeCopyFlag;
|
import com.plotsquared.core.plot.flag.implementations.PreventCreativeCopyFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag;
|
import com.plotsquared.core.plot.flag.implementations.TamedInteractFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag;
|
import com.plotsquared.core.plot.flag.implementations.UntrustedVisitFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.UseFlag;
|
|
||||||
import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag;
|
import com.plotsquared.core.plot.flag.implementations.VehicleBreakFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag;
|
import com.plotsquared.core.plot.flag.implementations.VehicleUseFlag;
|
||||||
import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag;
|
import com.plotsquared.core.plot.flag.implementations.VillagerInteractFlag;
|
||||||
import com.plotsquared.core.plot.flag.types.BlockTypeWrapper;
|
|
||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
import com.plotsquared.core.util.EventDispatcher;
|
import com.plotsquared.core.util.EventDispatcher;
|
||||||
import com.plotsquared.core.util.MathMan;
|
import com.plotsquared.core.util.MathMan;
|
||||||
@ -94,6 +92,7 @@ import org.bukkit.FluidCollisionMode;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.data.Waterlogged;
|
import org.bukkit.block.data.Waterlogged;
|
||||||
import org.bukkit.command.PluginCommand;
|
import org.bukkit.command.PluginCommand;
|
||||||
import org.bukkit.entity.ArmorStand;
|
import org.bukkit.entity.ArmorStand;
|
||||||
@ -224,6 +223,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringSplitter")
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||||
public void playerCommand(PlayerCommandPreprocessEvent event) {
|
public void playerCommand(PlayerCommandPreprocessEvent event) {
|
||||||
String msg = event.getMessage().toLowerCase().replaceAll("/", "").trim();
|
String msg = event.getMessage().toLowerCase().replaceAll("/", "").trim();
|
||||||
@ -379,6 +379,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
this.eventDispatcher.doRespawnTask(pp);
|
this.eventDispatcher.doRespawnTask(pp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // We explicitly want #getHomeSynchronous here
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onTeleport(PlayerTeleportEvent event) {
|
public void onTeleport(PlayerTeleportEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
@ -571,7 +572,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
player.teleport(event.getTo());
|
player.teleport(event.getTo());
|
||||||
this.tmpTeleport = true;
|
this.tmpTeleport = true;
|
||||||
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
||||||
} else {
|
} else if (MathMan.roundInt(from.getX()) <= border) { // Only send if they just moved out of the border
|
||||||
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
||||||
}
|
}
|
||||||
} else if (x2 < -border && this.tmpTeleport) {
|
} else if (x2 < -border && this.tmpTeleport) {
|
||||||
@ -581,7 +582,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
player.teleport(event.getTo());
|
player.teleport(event.getTo());
|
||||||
this.tmpTeleport = true;
|
this.tmpTeleport = true;
|
||||||
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
||||||
} else {
|
} else if (MathMan.roundInt(from.getX()) >= -border) { // Only send if they just moved out of the border
|
||||||
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
||||||
}
|
}
|
||||||
} else if (((x1 = MathMan.roundInt(from.getX())) >= border && x2 <= border) || (x1 <= -border && x2 >= -border)) {
|
} else if (((x1 = MathMan.roundInt(from.getX())) >= border && x2 <= border) || (x1 <= -border && x2 >= -border)) {
|
||||||
@ -662,7 +663,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
player.teleport(event.getTo());
|
player.teleport(event.getTo());
|
||||||
this.tmpTeleport = true;
|
this.tmpTeleport = true;
|
||||||
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
||||||
} else {
|
} else if (MathMan.roundInt(from.getZ()) <= border) { // Only send if they just moved out of the border
|
||||||
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
||||||
}
|
}
|
||||||
} else if (z2 < -border && this.tmpTeleport) {
|
} else if (z2 < -border && this.tmpTeleport) {
|
||||||
@ -672,7 +673,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
player.teleport(event.getTo());
|
player.teleport(event.getTo());
|
||||||
this.tmpTeleport = true;
|
this.tmpTeleport = true;
|
||||||
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
pp.sendMessage(TranslatableCaption.of("border.denied"));
|
||||||
} else {
|
} else if (MathMan.roundInt(from.getZ()) >= -border) { // Only send if they just moved out of the border
|
||||||
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
pp.sendMessage(TranslatableCaption.of("border.bypass.exited"));
|
||||||
}
|
}
|
||||||
} else if (((z1 = MathMan.roundInt(from.getZ())) >= border && z2 <= border) || (z1 <= -border && z2 >= -border)) {
|
} else if (((z1 = MathMan.roundInt(from.getZ())) >= border && z2 <= border) || (z1 <= -border && z2 >= -border)) {
|
||||||
@ -1063,9 +1064,13 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PlayerBlockEventType eventType = null;
|
PlayerBlockEventType eventType;
|
||||||
BlockType blocktype1;
|
BlockType blocktype1;
|
||||||
Block block = event.getClickedBlock();
|
Block block = event.getClickedBlock();
|
||||||
|
if (block == null) {
|
||||||
|
// We do not care in this case, the player is likely interacting with air ("nothing").
|
||||||
|
return;
|
||||||
|
}
|
||||||
Location location = BukkitUtil.adapt(block.getLocation());
|
Location location = BukkitUtil.adapt(block.getLocation());
|
||||||
Action action = event.getAction();
|
Action action = event.getAction();
|
||||||
switch (action) {
|
switch (action) {
|
||||||
@ -1667,6 +1672,7 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // #getLocate is needed for Spigot compatibility
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLocaleChange(final PlayerLocaleChangeEvent event) {
|
public void onLocaleChange(final PlayerLocaleChangeEvent event) {
|
||||||
// The event is fired before the player is deemed online upon login
|
// The event is fired before the player is deemed online upon login
|
||||||
@ -1702,22 +1708,49 @@ public class PlayerEventListener extends PlotListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPortalCreation(PortalCreateEvent event) {
|
public void onPortalCreation(PortalCreateEvent event) {
|
||||||
Location location = BukkitUtil.adapt(event.getEntity().getLocation());
|
String world = event.getWorld().getName();
|
||||||
PlotArea area = location.getPlotArea();
|
if (PlotSquared.get().getPlotAreaManager().getPlotAreasSet(world).size() == 0) {
|
||||||
if (area == null) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot plot = location.getOwnedPlot();
|
int minX = Integer.MAX_VALUE;
|
||||||
if (plot == null) {
|
int maxX = Integer.MIN_VALUE;
|
||||||
if (area.isRoadFlags() && area.getRoadFlag(DenyPortalsFlag.class)) {
|
int minZ = Integer.MAX_VALUE;
|
||||||
event.setCancelled(true);
|
int maxZ = Integer.MIN_VALUE;
|
||||||
|
for (BlockState state : event.getBlocks()) {
|
||||||
|
minX = Math.min(state.getX(), minX);
|
||||||
|
maxX = Math.max(state.getX(), maxX);
|
||||||
|
minZ = Math.min(state.getZ(), minZ);
|
||||||
|
maxZ = Math.max(state.getZ(), maxZ);
|
||||||
|
}
|
||||||
|
int y = event.getBlocks().get(0).getY(); // Don't need to worry about this too much
|
||||||
|
for (Location location : Set.of( // Use Set to lazily avoid duplicate locations
|
||||||
|
Location.at(world, minX, y, maxX),
|
||||||
|
Location.at(world, minZ, y, maxZ),
|
||||||
|
Location.at(world, minX, y, maxZ),
|
||||||
|
Location.at(world, minZ, y, maxX)
|
||||||
|
)) {
|
||||||
|
PlotArea area = location.getPlotArea();
|
||||||
|
if (area == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Plot plot = location.getOwnedPlot();
|
||||||
|
if (plot == null) {
|
||||||
|
if (area.isRoadFlags() && area.getRoadFlag(DenyPortalsFlag.class)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (plot.getFlag(DenyPortalsFlag.class)) {
|
|
||||||
if (plot.getFlag(DenyPortalsFlag.class)) {
|
if (plot.getFlag(DenyPortalsFlag.class)) {
|
||||||
plot.debug(event.getEntity().getName() + " did not create a portal because of deny-portals = true");
|
StringBuilder builder = new StringBuilder();
|
||||||
|
if (event.getEntity() != null) {
|
||||||
|
builder.append(event.getEntity().getName()).append(" did not create a portal");
|
||||||
|
} else {
|
||||||
|
builder.append("Portal creation cancelled");
|
||||||
|
}
|
||||||
|
plot.debug(builder.append(" because of deny-portals = true").toString());
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -43,7 +43,6 @@ import java.lang.reflect.Method;
|
|||||||
|
|
||||||
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public class SingleWorldListener implements Listener {
|
public class SingleWorldListener implements Listener {
|
||||||
|
|
||||||
private final Method methodGetHandleChunk;
|
private final Method methodGetHandleChunk;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.bukkit.managers;
|
package com.plotsquared.bukkit.managers;
|
||||||
|
|
||||||
|
/*
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
@ -35,10 +36,9 @@ import se.hyperver.hyperverse.world.WorldConfigurationBuilder;
|
|||||||
import se.hyperver.hyperverse.world.WorldFeatures;
|
import se.hyperver.hyperverse.world.WorldFeatures;
|
||||||
import se.hyperver.hyperverse.world.WorldType;
|
import se.hyperver.hyperverse.world.WorldType;
|
||||||
|
|
||||||
/**
|
Hyperverse implementation is currently put on ice until Hyperverse is released on a stable line and deployed to the central
|
||||||
* Hyperverse specific manager that creates worlds
|
repository.
|
||||||
* using Hyperverse's API
|
|
||||||
*/
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class HyperverseWorldManager extends BukkitWorldManager {
|
public class HyperverseWorldManager extends BukkitWorldManager {
|
||||||
|
|
||||||
@ -67,3 +67,4 @@ public class HyperverseWorldManager extends BukkitWorldManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -162,6 +162,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringSplitter")
|
||||||
@Override
|
@Override
|
||||||
@NonNegative
|
@NonNegative
|
||||||
public int hasPermissionRange(
|
public int hasPermissionRange(
|
||||||
@ -319,7 +320,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
if (id == ItemTypes.AIR) {
|
if (id == ItemTypes.AIR) {
|
||||||
// Let's just stop all the discs because why not?
|
// Let's just stop all the discs because why not?
|
||||||
for (final Sound sound : Arrays.stream(Sound.values())
|
for (final Sound sound : Arrays.stream(Sound.values())
|
||||||
.filter(sound -> sound.name().contains("DISC")).collect(Collectors.toList())) {
|
.filter(sound -> sound.name().contains("DISC")).toList()) {
|
||||||
player.stopSound(sound);
|
player.stopSound(sound);
|
||||||
}
|
}
|
||||||
// this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, Material.AIR);
|
// this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, Material.AIR);
|
||||||
@ -331,6 +332,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Needed for Spigot compatibility
|
||||||
@Override
|
@Override
|
||||||
public void kick(final String message) {
|
public void kick(final String message) {
|
||||||
this.player.kickPlayer(message);
|
this.player.kickPlayer(message);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -199,7 +199,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (localChunk.getTiles().size() > 0) {
|
if (localChunk.getTiles().size() > 0) {
|
||||||
localChunk.getTiles().forEach(((blockVector3, tag) -> {
|
localChunk.getTiles().forEach((blockVector3, tag) -> {
|
||||||
try {
|
try {
|
||||||
BaseBlock block = getWorld().getBlock(blockVector3).toBaseBlock(tag);
|
BaseBlock block = getWorld().getBlock(blockVector3).toBaseBlock(tag);
|
||||||
getWorld().setBlock(blockVector3, block, noSideEffectSet);
|
getWorld().setBlock(blockVector3, block, noSideEffectSet);
|
||||||
@ -207,7 +207,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
|||||||
StateWrapper sw = new StateWrapper(tag);
|
StateWrapper sw = new StateWrapper(tag);
|
||||||
sw.restoreTag(getWorld().getName(), blockVector3.getX(), blockVector3.getY(), blockVector3.getZ());
|
sw.restoreTag(getWorld().getName(), blockVector3.getX(), blockVector3.getY(), blockVector3.getZ());
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
}
|
}
|
||||||
if (localChunk.getEntities().size() > 0) {
|
if (localChunk.getEntities().size() > 0) {
|
||||||
localChunk.getEntities().forEach((location, entity) -> getWorld().createEntity(location, entity));
|
localChunk.getEntities().forEach((location, entity) -> getWorld().createEntity(location, entity));
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -166,6 +166,7 @@ public class StateWrapper {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // #setLine is needed for Spigot compatibility
|
||||||
public boolean restoreTag(String worldName, int x, int y, int z) {
|
public boolean restoreTag(String worldName, int x, int y, int z) {
|
||||||
if (this.tag == null) {
|
if (this.tag == null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -77,6 +77,7 @@ public class BukkitInventoryUtil extends InventoryUtil {
|
|||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Paper deprecation
|
||||||
@Override
|
@Override
|
||||||
public void open(PlotInventory inv) {
|
public void open(PlotInventory inv) {
|
||||||
BukkitPlayer bp = (BukkitPlayer) inv.getPlayer();
|
BukkitPlayer bp = (BukkitPlayer) inv.getPlayer();
|
||||||
@ -113,6 +114,7 @@ public class BukkitInventoryUtil extends InventoryUtil {
|
|||||||
bp.player.updateInventory();
|
bp.player.updateInventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Paper deprecation
|
||||||
public PlotItemStack getItem(ItemStack item) {
|
public PlotItemStack getItem(ItemStack item) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return null;
|
return null;
|
||||||
@ -145,6 +147,7 @@ public class BukkitInventoryUtil extends InventoryUtil {
|
|||||||
.toArray(PlotItemStack[]::new);
|
.toArray(PlotItemStack[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // #getTitle is needed for Spigot compatibility
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpen(PlotInventory plotInventory) {
|
public boolean isOpen(PlotInventory plotInventory) {
|
||||||
if (!plotInventory.isOpen()) {
|
if (!plotInventory.isOpen()) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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,6 +61,7 @@ public class UpdateUtility implements Listener {
|
|||||||
internalVersion = PlotSquared.get().getVersion();
|
internalVersion = PlotSquared.get().getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({"deprecation", "DefaultCharset"}) // Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
|
||||||
public void updateChecker() {
|
public void updateChecker() {
|
||||||
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
|
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
|
||||||
try {
|
try {
|
||||||
@ -68,7 +69,7 @@ public class UpdateUtility implements Listener {
|
|||||||
"https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506")
|
"https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506")
|
||||||
.openConnection();
|
.openConnection();
|
||||||
connection.setRequestMethod("GET");
|
connection.setRequestMethod("GET");
|
||||||
JsonObject result = (new JsonParser())
|
JsonObject result = new JsonParser()
|
||||||
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
|
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
|
||||||
.getAsJsonObject();
|
.getAsJsonObject();
|
||||||
spigotVersion = result.get("current_version").getAsString();
|
spigotVersion = result.get("current_version").getAsString();
|
||||||
@ -91,7 +92,7 @@ public class UpdateUtility implements Listener {
|
|||||||
notify = false;
|
notify = false;
|
||||||
LOGGER.info("Congratulations! You are running the latest PlotSquared version");
|
LOGGER.info("Congratulations! You are running the latest PlotSquared version");
|
||||||
}
|
}
|
||||||
}, 0L, Settings.UpdateChecker.POLL_RATE * 60 * 20);
|
}, 0L, (long) Settings.UpdateChecker.POLL_RATE * 60 * 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelTask() {
|
private void cancelTask() {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -75,6 +75,7 @@ public class FaweSchematicHandler extends SchematicHandler {
|
|||||||
return delegate.save(tag, path);
|
return delegate.save(tag, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("removal") // Just the override
|
||||||
@Override
|
@Override
|
||||||
public void upload(final CompoundTag tag, final UUID uuid, final String file, final RunnableVal<URL> whenDone) {
|
public void upload(final CompoundTag tag, final UUID uuid, final String file, final RunnableVal<URL> whenDone) {
|
||||||
delegate.upload(tag, uuid, file, whenDone);
|
delegate.upload(tag, uuid, file, whenDone);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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 @@ dependencies {
|
|||||||
api(libs.guiceassistedinject) {
|
api(libs.guiceassistedinject) {
|
||||||
exclude("com.google.inject", "guice")
|
exclude("com.google.inject", "guice")
|
||||||
}
|
}
|
||||||
compileOnlyApi(libs.findbugs)
|
api(libs.findbugs)
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
compileOnly(libs.worldeditCore) {
|
compileOnly(libs.worldeditCore) {
|
||||||
@ -40,9 +40,7 @@ dependencies {
|
|||||||
// Other libraries
|
// Other libraries
|
||||||
api(libs.prtree)
|
api(libs.prtree)
|
||||||
api(libs.aopalliance)
|
api(libs.aopalliance)
|
||||||
api(libs.rorledning) {
|
api(libs.cloudServices)
|
||||||
exclude(group = "com.google.guava")
|
|
||||||
}
|
|
||||||
api(libs.arkitektonika)
|
api(libs.arkitektonika)
|
||||||
api(libs.paster)
|
api(libs.paster)
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -25,10 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.core;
|
package com.plotsquared.core;
|
||||||
|
|
||||||
|
import cloud.commandframework.services.ServicePipeline;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
||||||
import com.google.inject.TypeLiteral;
|
import com.google.inject.TypeLiteral;
|
||||||
import com.intellectualsites.services.ServicePipeline;
|
|
||||||
import com.plotsquared.core.backup.BackupManager;
|
import com.plotsquared.core.backup.BackupManager;
|
||||||
import com.plotsquared.core.configuration.caption.LocaleHolder;
|
import com.plotsquared.core.configuration.caption.LocaleHolder;
|
||||||
import com.plotsquared.core.generator.GeneratorWrapper;
|
import com.plotsquared.core.generator.GeneratorWrapper;
|
||||||
@ -40,6 +40,7 @@ import com.plotsquared.core.permissions.PermissionHandler;
|
|||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
import com.plotsquared.core.queue.GlobalBlockQueue;
|
import com.plotsquared.core.queue.GlobalBlockQueue;
|
||||||
|
import com.plotsquared.core.util.AnnotationHelper;
|
||||||
import com.plotsquared.core.util.ChunkManager;
|
import com.plotsquared.core.util.ChunkManager;
|
||||||
import com.plotsquared.core.util.EconHandler;
|
import com.plotsquared.core.util.EconHandler;
|
||||||
import com.plotsquared.core.util.PlatformWorldManager;
|
import com.plotsquared.core.util.PlatformWorldManager;
|
||||||
@ -291,6 +292,15 @@ public interface PlotPlatform<P> extends LocaleHolder {
|
|||||||
*/
|
*/
|
||||||
@NonNull String pluginsFormatted();
|
@NonNull String pluginsFormatted();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the kind of WorldEdit implementation
|
||||||
|
*
|
||||||
|
* @return worldedit implementations
|
||||||
|
* @since 6.3.0
|
||||||
|
*/
|
||||||
|
@AnnotationHelper.ApiDescription(info = "Internal use only")
|
||||||
|
@NonNull String worldEditImplementations();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the caption maps
|
* Load the caption maps
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -106,7 +106,7 @@ public class Add extends Command {
|
|||||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) {
|
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_TRUST))) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("errors.invalid_player"),
|
TranslatableCaption.of("errors.invalid_player"),
|
||||||
Template.of("value", PlayerManager.getName(uuid))
|
Template.of("value", PlayerManager.resolveName(uuid).getComponent(player))
|
||||||
);
|
);
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
continue;
|
continue;
|
||||||
@ -114,7 +114,7 @@ public class Add extends Command {
|
|||||||
if (plot.isOwner(uuid)) {
|
if (plot.isOwner(uuid)) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("member.already_added"),
|
TranslatableCaption.of("member.already_added"),
|
||||||
Template.of("player", PlayerManager.getName(uuid))
|
Template.of("player", PlayerManager.resolveName(uuid).getComponent(player))
|
||||||
);
|
);
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
continue;
|
continue;
|
||||||
@ -122,7 +122,7 @@ public class Add extends Command {
|
|||||||
if (plot.getMembers().contains(uuid)) {
|
if (plot.getMembers().contains(uuid)) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("member.already_added"),
|
TranslatableCaption.of("member.already_added"),
|
||||||
Template.of("player", PlayerManager.getName(uuid))
|
Template.of("player", PlayerManager.resolveName(uuid).getComponent(player))
|
||||||
);
|
);
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
continue;
|
continue;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -25,9 +25,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.core.command;
|
package com.plotsquared.core.command;
|
||||||
|
|
||||||
import com.google.common.reflect.TypeToken;
|
import cloud.commandframework.services.ServicePipeline;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.intellectualsites.services.ServicePipeline;
|
|
||||||
import com.plotsquared.core.PlotSquared;
|
import com.plotsquared.core.PlotSquared;
|
||||||
import com.plotsquared.core.configuration.Settings;
|
import com.plotsquared.core.configuration.Settings;
|
||||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||||
@ -51,6 +50,7 @@ import com.plotsquared.core.util.PlotExpression;
|
|||||||
import com.plotsquared.core.util.task.AutoClaimFinishTask;
|
import com.plotsquared.core.util.task.AutoClaimFinishTask;
|
||||||
import com.plotsquared.core.util.task.RunnableVal;
|
import com.plotsquared.core.util.task.RunnableVal;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
import com.plotsquared.core.util.task.TaskManager;
|
||||||
|
import io.leangen.geantyref.TypeToken;
|
||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
@ -84,7 +84,7 @@ public class Auto extends SubCommand {
|
|||||||
this.eventDispatcher = eventDispatcher;
|
this.eventDispatcher = eventDispatcher;
|
||||||
this.econHandler = econHandler;
|
this.econHandler = econHandler;
|
||||||
this.servicePipeline = servicePipeline;
|
this.servicePipeline = servicePipeline;
|
||||||
this.servicePipeline.registerServiceType(TypeToken.of(AutoService.class), new AutoService.DefaultAutoService());
|
this.servicePipeline.registerServiceType(TypeToken.get(AutoService.class), new AutoService.DefaultAutoService());
|
||||||
final AutoService.MultiPlotService multiPlotService = new AutoService.MultiPlotService();
|
final AutoService.MultiPlotService multiPlotService = new AutoService.MultiPlotService();
|
||||||
this.servicePipeline.registerServiceImplementation(AutoService.class, multiPlotService,
|
this.servicePipeline.registerServiceImplementation(AutoService.class, multiPlotService,
|
||||||
Collections.singletonList(multiPlotService)
|
Collections.singletonList(multiPlotService)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* | |
|
* | |
|
||||||
* |_|
|
* |_|
|
||||||
* PlotSquared plot management system for Minecraft
|
* PlotSquared plot management system for Minecraft
|
||||||
* Copyright (C) 2021 IntellectualSites
|
* Copyright (C) 2014 - 2022 IntellectualSites
|
||||||
*
|
*
|
||||||
* 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
Reference in New Issue
Block a user