Permalink
Browse files

Make the full jump to 1.12.

Warning: this really really really does not work with previous MC versions.
  • Loading branch information...
wizjany committed Sep 16, 2017
1 parent 3a8e3e8 commit f76259df82a23391f3fa5e062c893d4a1604adeb
Showing with 197 additions and 214 deletions.
  1. +3 −6 worldguard-legacy/build.gradle
  2. +5 −4 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/BukkitPlayer.java
  3. +16 −26 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java
  4. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/AsyncCommandHelper.java
  5. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/CommandUtils.java
  6. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/FutureProgressListener.java
  7. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/MessageFutureCallback.java
  8. +4 −4 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/WorldGuardCommands.java
  9. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/region/MemberCommands.java
  10. +2 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/region/RegionCommands.java
  11. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java
  12. +132 −141 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java
  13. +8 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/protection/managers/RegionManager.java
  14. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/protection/managers/index/ChunkHashTable.java
  15. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/EngineHubPaste.java
  16. +1 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/Pastebin.java
  17. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/Paster.java
  18. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/Pasters.java
  19. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/profiler/SamplerBuilder.java
  20. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/AbstractTask.java
  21. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/FutureForwardingTask.java
  22. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/SimpleSupervisor.java
  23. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/Task.java
@@ -4,17 +4,16 @@ apply plugin: 'idea'
project.version = '6.2.2-SNAPSHOT'
ext.internalVersion = project.version + ";" + gitCommitHash
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8
checkstyle.configFile = new File(projectDir, "config/checkstyle/checkstyle.xml")
dependencies {
compile 'org.khelekore:prtree:1.5.0'
compile 'org.bukkit:bukkit:1.11-R0.1-SNAPSHOT'
compile 'org.bukkit:bukkit:1.12-R0.1-SNAPSHOT'
compile 'com.sk89q.worldedit:worldedit-bukkit:6.1.3-SNAPSHOT'
compile 'com.sk89q:squirrelid:0.1.0'
compile 'com.sk89q:guavabackport:1.2'
compile 'org.flywaydb:flyway-core:3.0'
compile ('com.sk89q:commandbook:2.3') {
exclude group: 'com.sk89q', module: 'worldedit'
@@ -41,14 +40,12 @@ processResources {
shadowJar {
dependencies {
include(dependency('org.khelekore:prtree:1.5.0'))
include(dependency('com.sk89q:guavabackport:1.2'))
include(dependency('com.sk89q:squirrelid:0.1.0'))
include(dependency('org.flywaydb:flyway-core:3.0'))
include(dependency('com.googlecode.json-simple:json-simple:1.1.1'))
include(dependency('net.sf.opencsv:opencsv:2.0'))
}
relocate('com.sk89q.guavabackport', 'com.sk89q.worldguard.internal.guava')
relocate('org.flywaydb', 'com.sk89q.worldguard.internal.flywaydb')
relocate('com.sk89q.squirrelid', 'com.sk89q.worldguard.util.profile')
relocate('org.json.simple', 'com.sk89q.worldguard.util.jsonsimple')
@@ -19,11 +19,12 @@
package com.sk89q.worldguard.bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldguard.LocalPlayer;
import org.bukkit.BanList.Type;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import java.util.UUID;
@@ -82,7 +83,7 @@ public void kick(String msg) {
@Override
public void ban(String msg) {
if (!silenced) {
player.setBanned(true);
Bukkit.getBanList(Type.NAME).addBan(player.getName(), null, null, null);
player.kickPlayer(msg);
}
}
@@ -21,43 +21,33 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListeningExecutorService;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.bukkit.util.CommandsManagerRegistration;
import com.sk89q.minecraft.util.commands.*;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandPermissionsException;
import com.sk89q.minecraft.util.commands.CommandUsageException;
import com.sk89q.minecraft.util.commands.CommandsManager;
import com.sk89q.minecraft.util.commands.MissingNestedCommandException;
import com.sk89q.minecraft.util.commands.SimpleInjector;
import com.sk89q.minecraft.util.commands.WrappedCommandException;
import com.sk89q.squirrelid.cache.HashMapCache;
import com.sk89q.squirrelid.cache.ProfileCache;
import com.sk89q.squirrelid.cache.SQLiteCache;
import com.sk89q.squirrelid.resolver.*;
import com.sk89q.squirrelid.resolver.BukkitPlayerService;
import com.sk89q.squirrelid.resolver.CacheForwardingService;
import com.sk89q.squirrelid.resolver.CombinedProfileService;
import com.sk89q.squirrelid.resolver.HttpRepositoryService;
import com.sk89q.squirrelid.resolver.ProfileService;
import com.sk89q.wepif.PermissionsResolverManager;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.bukkit.commands.GeneralCommands;
import com.sk89q.worldguard.bukkit.commands.ProtectionCommands;
import com.sk89q.worldguard.bukkit.commands.ToggleCommands;
import com.sk89q.worldguard.bukkit.event.player.ProcessPlayerEvent;
import com.sk89q.worldguard.bukkit.listener.BlacklistListener;
import com.sk89q.worldguard.bukkit.listener.BlockedPotionsListener;
import com.sk89q.worldguard.bukkit.listener.BuildPermissionListener;
import com.sk89q.worldguard.bukkit.listener.ChestProtectionListener;
import com.sk89q.worldguard.bukkit.listener.DebuggingListener;
import com.sk89q.worldguard.bukkit.listener.EventAbstractionListener;
import com.sk89q.worldguard.bukkit.listener.InvincibilityListener;
import com.sk89q.worldguard.bukkit.listener.PlayerModesListener;
import com.sk89q.worldguard.bukkit.listener.PlayerMoveListener;
import com.sk89q.worldguard.bukkit.listener.RegionFlagsListener;
import com.sk89q.worldguard.bukkit.listener.RegionProtectionListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardBlockListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardCommandBookListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardEntityListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardHangingListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardPlayerListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardServerListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardVehicleListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardWeatherListener;
import com.sk89q.worldguard.bukkit.listener.WorldGuardWorldListener;
import com.sk89q.worldguard.bukkit.listener.WorldRulesListener;
import com.sk89q.worldguard.bukkit.listener.*;
import com.sk89q.worldguard.bukkit.util.Events;
import com.sk89q.worldguard.protection.GlobalRegionManager;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.util.task.FutureForwardingTask;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.World;
@@ -20,9 +20,9 @@
package com.sk89q.worldguard.bukkit.commands;
import com.google.common.base.Function;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.util.paste.EngineHubPaste;
import org.bukkit.ChatColor;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@@ -49,7 +49,7 @@ public void run() {
}
public static void addProgressListener(ListenableFuture<?> future, CommandSender sender, String message) {
future.addListener(new FutureProgressListener(sender, message), MoreExecutors.sameThreadExecutor());
future.addListener(new FutureProgressListener(sender, message), MoreExecutors.directExecutor());
}
}
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.bukkit.commands;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.FutureCallback;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@@ -22,9 +22,9 @@
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.io.Files;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.minecraft.util.commands.*;
import com.sk89q.worldguard.bukkit.ConfigurationManager;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
@@ -204,7 +204,7 @@ public void run() {
activeSampler = null;
}
}
}, MoreExecutors.sameThreadExecutor());
}, MoreExecutors.directExecutor());
Futures.addCallback(sampler.getFuture(), new FutureCallback<Sampler>() {
@Override
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands.region;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands.region;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
@@ -72,7 +72,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -918,12 +918,12 @@ public void onBlockDispense(BlockDispenseEvent event) {
}
// Handle created armor stands
if (item != null && item.getType() == Materials.ARMOR_STAND) {
if (item != null && item.getType() == Material.ARMOR_STAND) {
Events.fireToCancel(event, new SpawnEntityEvent(event, cause, placed.getLocation().add(0.5, 0, 0.5), EntityType.ARMOR_STAND));
return;
}
if (item != null && item.getType() == Materials.END_CRYSTAL) { /*&& placed.getType() == Material.BEDROCK) {*/ // in vanilla you can only place them on bedrock but who knows what plugins will add
if (item != null && item.getType() == Material.END_CRYSTAL) { /*&& placed.getType() == Material.BEDROCK) {*/ // in vanilla you can only place them on bedrock but who knows what plugins will add
// may be overprotective as a result, but better than being underprotective
Events.fireToCancel(event, new SpawnEntityEvent(event, cause, placed.getLocation().add(0.5, 0, 0.5), EntityType.ENDER_CRYSTAL));
return;
Oops, something went wrong.

0 comments on commit f76259d

Please sign in to comment.