Skip to content

Commit

Permalink
Release 1.8.
Browse files Browse the repository at this point in the history
1) Add check for FakePlayer in RealPlayer code.
2) Add "WG not installed" error description.
  • Loading branch information
gamerforEA committed Jun 5, 2017
1 parent 26c5b4d commit 08613dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'forge'

[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

version = "1.7"
version = "1.8"
group= "com.gamerforea"
archivesBaseName = "EventHelper"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public final void setRealPlayer(EntityPlayer player)
if (player != null)
{
this.profile = player.getGameProfile();
this.realPlayer = new WeakReference<EntityPlayer>(player);
if (!(player instanceof FakePlayer))
this.realPlayer = new WeakReference<EntityPlayer>(player);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/gamerforea/eventhelper/wg/WGReflection.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.bukkit.plugin.Plugin;

import com.google.common.base.Preconditions;
import com.google.common.io.ByteStreams;

public final class WGReflection
Expand All @@ -13,6 +14,7 @@ public final class WGReflection

public static final void setWG(Plugin plugin)
{
Preconditions.checkNotNull(plugin, "WorldGuard not installed!");
wgPlugin = plugin;
wgClassLoader = plugin.getClass().getClassLoader();
}
Expand Down

0 comments on commit 08613dc

Please sign in to comment.