Skip to content

Commit

Permalink
Fix player functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed May 17, 2018
1 parent dece69f commit 79147f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.pseudoknight</groupId>
<artifactId>chpaper</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
<name>CHPaper</name>
<description>Gives access to methods available in PaperSpigot but not Bukkit or Spigot</description>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/pseudoknight/chpaper/Extension.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class Extension extends AbstractExtension {

public Version getVersion() {
return new SimpleVersion(0,2,0);
return new SimpleVersion(0,2,1);
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/me/pseudoknight/chpaper/PlayerFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Construct exec(Target t, Environment environment, Construct... args) thro
p = Static.GetPlayer(args[0], t);
distance = Static.getInt32(args[1], t);
}
((Player) p).setViewDistance(distance);
((Player) p.getHandle()).setViewDistance(distance);
return CVoid.VOID;
}

Expand Down Expand Up @@ -95,7 +95,7 @@ public Construct exec(Target t, Environment environment, Construct... args) thro
} else {
p = Static.GetPlayer(args[0], t);
}
return new CInt(((Player) p).getViewDistance(), t);
return new CInt(((Player) p.getHandle()).getViewDistance(), t);
}

public Class<? extends CREThrowable>[] thrown() {
Expand Down Expand Up @@ -139,7 +139,7 @@ public Construct exec(Target t, Environment env, Construct... args) throws Confi
p = env.getEnv(CommandHelperEnvironment.class).GetPlayer();
Static.AssertPlayerNonNull(p, t);
}
return CBoolean.get(((Player) p).getAffectsSpawning());
return CBoolean.get(((Player) p.getHandle()).getAffectsSpawning());
}

public Class<? extends CREThrowable>[] thrown() {
Expand Down Expand Up @@ -186,7 +186,7 @@ public Construct exec(Target t, Environment env, Construct... args) throws Confi
Static.AssertPlayerNonNull(p, t);
doesAffect = Static.getBoolean(args[0]);
}
((Player) p).setAffectsSpawning(doesAffect);
((Player) p.getHandle()).setAffectsSpawning(doesAffect);
return CVoid.VOID;
}

Expand Down

0 comments on commit 79147f6

Please sign in to comment.