mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Move all ScriptEngines to Entity
This commit is contained in:
@@ -5,19 +5,10 @@ Subject: [PATCH] Add player death exp control options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index e0544699714fd4c6ef2deb17f49b8246a7021463..3dc2ebc102fe3f575eede672509f330271571575 100644
|
||||
index e0544699714fd4c6ef2deb17f49b8246a7021463..831a62e56c745884f34fb5d8f84f037543d77d1d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -194,6 +194,8 @@ public abstract class Player extends LivingEntity {
|
||||
// CraftBukkit end
|
||||
|
||||
// Purpur start
|
||||
+ private javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino");
|
||||
+
|
||||
public abstract void resetLastActionTime();
|
||||
|
||||
public void setAfk(boolean afk) {
|
||||
@@ -1909,9 +1911,18 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1909,9 +1909,18 @@ public abstract class Player extends LivingEntity {
|
||||
@Override
|
||||
protected int getExperienceReward(Player player) {
|
||||
if (!this.level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator()) {
|
||||
|
||||
Reference in New Issue
Block a user