Merge branch 'develop' of ssh://184.154.0.242:7999/min/Mineplex into alex-compvanilla
This commit is contained in:
commit
53ac1827bc
22
Patches/Bukkit-Patches/0001-Update-groupId.patch
Normal file
22
Patches/Bukkit-Patches/0001-Update-groupId.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From b3604650ac6e2813f9e1b4d54862ce79c37e001e Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Mon, 15 Feb 2016 09:39:33 +1100
|
||||
Subject: [PATCH] Update groupId
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index cb142f2..378fd01 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -9,7 +9,7 @@
|
||||
<version>9</version>
|
||||
</parent>
|
||||
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
+ <groupId>com.mineplex</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f037882f13b3ea9d0a0137260e365a4332a8e751 Mon Sep 17 00:00:00 2001
|
||||
From 41b16c2e04b2bc8ada5d0ed363e4ea5e6b466ee1 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:23:18 +1300
|
||||
Subject: [PATCH] LivingEntity changes
|
||||
@ -30,5 +30,5 @@ index 48e2508..fb623ae 100644
|
||||
+ public void setGhost(boolean ghost);
|
||||
}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c6e51ae8ffc31d0fc059d33ca159df31c2b7a83e Mon Sep 17 00:00:00 2001
|
||||
From 1bb1629f460d9c8ababad25722bebd0fedf2b269 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Sun, 22 Nov 2015 14:37:11 +1300
|
||||
Subject: [PATCH] EntityDismountEvent
|
||||
@ -43,5 +43,5 @@ index 24d4942..02943d6 100644
|
||||
+
|
||||
}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
31
Patches/CraftBukkit-Patches/0001-Update-groupId.patch
Normal file
31
Patches/CraftBukkit-Patches/0001-Update-groupId.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 409122f500f205b8a9b0fdec56900d83cee9f1ba Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Mon, 15 Feb 2016 09:56:14 +1100
|
||||
Subject: [PATCH] Update groupId
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 91627ff..c1d1fb7 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
+ <groupId>com.mineplex</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
||||
@@ -34,7 +34,7 @@
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
+ <groupId>com.mineplex</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b9014b76bbb262a39ce2d70cbe831ceb07acf68d Mon Sep 17 00:00:00 2001
|
||||
From 687c7ed26e1733b8ed688243cd6df91c45db148a Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:14:50 +1300
|
||||
Subject: [PATCH] Modify packets to public
|
||||
@ -2033,5 +2033,5 @@ index 0000000..4c2705b
|
||||
+}
|
||||
\ No newline at end of file
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9f12f0f7abe2a94fe4a724a7c17245b9c0f33a70 Mon Sep 17 00:00:00 2001
|
||||
From ca990c7ca61006f0933d0e117f1003822b887667 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:16:07 +1300
|
||||
Subject: [PATCH] Modifiy entity
|
||||
@ -677,7 +677,7 @@ index a8a327d..b7647bc 100644
|
||||
this.bp = null;
|
||||
if (!this.world.isClientSide && flag1) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 3c852fd..b861dbe 100644
|
||||
index f643b29..f75b0b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -101,6 +101,18 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -699,7 +699,7 @@ index 3c852fd..b861dbe 100644
|
||||
public EntityLiving(World world) {
|
||||
super(world);
|
||||
this.initAttributes();
|
||||
@@ -1783,7 +1795,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1784,7 +1796,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public boolean ad() {
|
||||
@ -800,5 +800,5 @@ index 5317cff..60e8584 100644
|
||||
return Math.min(Math.max(0, getHandle().getHealth()), getMaxHealth());
|
||||
}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 71c20f9d0c8bfa388f6bf0ba1a7b765a83e9de2a Mon Sep 17 00:00:00 2001
|
||||
From c8c2e86ef3ac3baf774afacf5fe2fab0b39a39a6 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:21:32 +1300
|
||||
Subject: [PATCH] Chunk changes
|
||||
@ -231,5 +231,5 @@ index 975d666..a55bd6c 100644
|
||||
/*
|
||||
* If it's a new world, the first few chunks are generated inside
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 47c08a6099856faf0049c0b0cdde495a8ae4166e Mon Sep 17 00:00:00 2001
|
||||
From 04418c14f74d251cebe99e4bc6315d619b0a4440 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:22:05 +1300
|
||||
Subject: [PATCH] Packet listener changes
|
||||
@ -349,5 +349,5 @@ index 5740e49..5edef3e 100644
|
||||
|
||||
public void a(PacketPlayInWindowClick packetplayinwindowclick) {
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
70
Patches/CraftBukkit-Patches/0006-Inventory-changes.patch
Normal file
70
Patches/CraftBukkit-Patches/0006-Inventory-changes.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 413c649570b54e6d7a50da7aa888cfb20018f523 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:22:36 +1300
|
||||
Subject: [PATCH] Inventory changes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||
index e99b8cc..428836c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||
@@ -32,7 +32,7 @@ public class CraftInventoryCustom extends CraftInventory {
|
||||
super(new MinecraftInventory(owner, size, title));
|
||||
}
|
||||
|
||||
- static class MinecraftInventory implements IInventory {
|
||||
+ public static class MinecraftInventory implements IInventory {
|
||||
private final ItemStack[] items;
|
||||
private int maxStack = MAX_STACK;
|
||||
private final List<HumanEntity> viewers;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 23f05f4..fdaf026 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.server.NBTTagString;
|
||||
import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
|
||||
@DelegateDeserialization(ItemStack.class)
|
||||
-public final class CraftItemStack extends ItemStack {
|
||||
+public class CraftItemStack extends ItemStack {
|
||||
|
||||
public static net.minecraft.server.ItemStack asNMSCopy(ItemStack original) {
|
||||
if (original instanceof CraftItemStack) {
|
||||
@@ -95,26 +95,30 @@ public final class CraftItemStack extends ItemStack {
|
||||
/**
|
||||
* Mirror
|
||||
*/
|
||||
- private CraftItemStack(net.minecraft.server.ItemStack item) {
|
||||
+ protected CraftItemStack(net.minecraft.server.ItemStack item) {
|
||||
this.handle = item;
|
||||
}
|
||||
|
||||
- private CraftItemStack(ItemStack item) {
|
||||
+ protected CraftItemStack(ItemStack item) {
|
||||
this(item.getTypeId(), item.getAmount(), item.getDurability(), item.hasItemMeta() ? item.getItemMeta() : null);
|
||||
}
|
||||
|
||||
- private CraftItemStack(Material type, int amount, short durability, ItemMeta itemMeta) {
|
||||
+ protected CraftItemStack(Material type, int amount, short durability, ItemMeta itemMeta) {
|
||||
setType(type);
|
||||
setAmount(amount);
|
||||
setDurability(durability);
|
||||
setItemMeta(itemMeta);
|
||||
}
|
||||
|
||||
- private CraftItemStack(int typeId, int amount, short durability, ItemMeta itemMeta) {
|
||||
+ protected CraftItemStack(int typeId, int amount, short durability, ItemMeta itemMeta) {
|
||||
this(Material.getMaterial(typeId), amount, durability, itemMeta);
|
||||
|
||||
}
|
||||
|
||||
+ public net.minecraft.server.ItemStack getHandle() {
|
||||
+ return handle;
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
public int getTypeId() {
|
||||
return handle != null ? CraftMagicNumbers.getId(handle.getItem()) : 0;
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 088fc9372c061edac80ee5cce669382ebed0b1e3 Mon Sep 17 00:00:00 2001
|
||||
From 7772a2a9b83ee223c01ac2003ba32a1b95a7c0cd Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:23:00 +1300
|
||||
Subject: [PATCH] Misc changes
|
||||
@ -273,5 +273,5 @@ index 29082aa..e979f69 100644
|
||||
}
|
||||
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9aded83bc47bf6ba8076fc2ed03ebbe480df1296 Mon Sep 17 00:00:00 2001
|
||||
From 969a70f201e6eda7d990e11e292e0dacc35f8ddf Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Wed, 28 Oct 2015 09:00:24 +1300
|
||||
Subject: [PATCH] EntityGuardian is now vegetateable
|
||||
@ -601,5 +601,5 @@ index 0000000..c14caf2
|
||||
+ public PathfinderGoalRandomStroll goalRandomStroll;
|
||||
+}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d3b44ea22080f4d15bf45b74b46b989b29f7b039 Mon Sep 17 00:00:00 2001
|
||||
From a48503259a76ca5b9fec3bd7ec06e0e5c1d3f8e1 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 30 Oct 2015 20:02:58 +1300
|
||||
Subject: [PATCH] Controller look vegetateHead, Entity collide changes
|
||||
@ -39,5 +39,5 @@ index cb9ba53..8660762 100644
|
||||
double d0 = entity.locX - this.locX;
|
||||
double d1 = entity.locZ - this.locZ;
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a793ae3653b54c211b2c40147e031449d3e1cf72 Mon Sep 17 00:00:00 2001
|
||||
From bafc21b97584c9207f29804520942285752d6b53 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Tue, 3 Nov 2015 21:21:02 +1300
|
||||
Subject: [PATCH] Vegetate head ai
|
||||
@ -95,7 +95,7 @@ index b7647bc..c2ef000 100644
|
||||
this.yaw = this.b(this.yaw, f2, f);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index b861dbe..4de7e4c 100644
|
||||
index f75b0b1..e384c2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -113,6 +113,18 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -135,5 +135,5 @@ index b861dbe..4de7e4c 100644
|
||||
} else if (!this.bM()) {
|
||||
this.motX *= 0.98D;
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From afb13529d05ad4adb0afa8cf8430e942d3e65e90 Mon Sep 17 00:00:00 2001
|
||||
From 5e1591dec2adb9001c9c3aafd0908d95eadff484 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Sun, 8 Nov 2015 17:57:05 +1300
|
||||
Subject: [PATCH] Modifications to cb
|
||||
@ -104,7 +104,7 @@ index c2ef000..b7647bc 100644
|
||||
this.yaw = this.b(this.yaw, f2, f);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 4de7e4c..b861dbe 100644
|
||||
index e384c2c..f75b0b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -113,18 +113,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -1614,5 +1614,5 @@ index 0000000..fdf0e10
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cddf775b575f0db92e478c858283869ac0b9bdc2 Mon Sep 17 00:00:00 2001
|
||||
From d57744e41ed408a6f924665509bb03fac0590cfa Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Mon, 9 Nov 2015 00:07:26 +1300
|
||||
Subject: [PATCH] Add IEntitySelector, have isGhost() return the same as
|
||||
@ -115,5 +115,5 @@ index 0000000..1536600
|
||||
+
|
||||
+}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e81762b9aa4f28474b2ccd06ae6ad5b7c840e1ba Mon Sep 17 00:00:00 2001
|
||||
From c6967f167cb74718389c7d87a0e4847d2824e855 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Mon, 9 Nov 2015 00:13:21 +1300
|
||||
Subject: [PATCH] Add player spectator
|
||||
@ -18,5 +18,5 @@ index 1536600..f86cf48 100644
|
||||
|
||||
public boolean apply(Object obj)
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5dac54f90504022449cbd5ea23e5306f17523fe2 Mon Sep 17 00:00:00 2001
|
||||
From 9eb0754b8eaed3dd60355206dd53c6b4dacab361 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Mon, 9 Nov 2015 02:41:31 +1300
|
||||
Subject: [PATCH] Fixed ai typo
|
||||
@ -18,5 +18,5 @@ index f86cf48..b4d70ad 100644
|
||||
|
||||
public boolean apply(Object obj)
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ea74383b4c0f5160f0d890d9377bd0d72e31db0c Mon Sep 17 00:00:00 2001
|
||||
From d37159de8e6c19ed8e232666661572cc399dc82a Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Wed, 11 Nov 2015 00:21:54 +1300
|
||||
Subject: [PATCH] Fix casting bug
|
||||
@ -60,5 +60,5 @@ index 60e8584..746961e 100644
|
||||
|
||||
public boolean isGhost()
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 896df3218cf190a29901619e762b5399517dbfbd Mon Sep 17 00:00:00 2001
|
||||
From c881d98fee52e719e60a5c8f5eeb9497357dd597 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Wed, 11 Nov 2015 11:43:17 +1300
|
||||
Subject: [PATCH] Fix schedulers
|
||||
@ -33,5 +33,5 @@ index 1d29ae7..55e2afd 100644
|
||||
SpigotTimings.processQueueTimer.startTiming(); // Spigot
|
||||
while (!processQueue.isEmpty()) {
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,37 +1,27 @@
|
||||
From bc86c3b02f2efa4c1194fc908e8d1ee8723f62c5 Mon Sep 17 00:00:00 2001
|
||||
From b0eb73047d9e8e06c2822142dc8c443efa9eda2e Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Sun, 22 Nov 2015 14:41:11 +1300
|
||||
Subject: [PATCH] EntityDismountEvent & teleport crash fix
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 81ca499..7165579 100644
|
||||
index 81ca499..2a4f819 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -23,6 +23,8 @@ import org.bukkit.event.painting.PaintingBreakByEntityEvent;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
import org.bukkit.event.vehicle.VehicleEnterEvent;
|
||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||
+import org.spigotmc.event.entity.EntityDismountEvent;
|
||||
+import org.spigotmc.event.entity.EntityMountEvent;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
@@ -1591,7 +1593,12 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -1591,7 +1591,11 @@ public abstract class Entity implements ICommandListener {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
- pluginManager.callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot
|
||||
+ EntityDismountEvent event = new org.spigotmc.event.entity.EntityDismountEvent(this.getBukkitEntity(), this.vehicle.getBukkitEntity());
|
||||
+ org.spigotmc.event.entity.EntityDismountEvent event = new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ); // Spigot
|
||||
+ pluginManager.callEvent(event); // Spigot
|
||||
+
|
||||
+ if (event.isCancelled() || vehicle != originalVehicle) {
|
||||
+ return;
|
||||
+ } // Spigot
|
||||
+ }
|
||||
this.setPositionRotation(this.vehicle.locX, this.vehicle.getBoundingBox().b + (double) this.vehicle.length, this.vehicle.locZ, this.yaw, this.pitch);
|
||||
this.vehicle.passenger = null;
|
||||
}
|
||||
@@ -1599,44 +1606,45 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -1599,44 +1603,44 @@ public abstract class Entity implements ICommandListener {
|
||||
this.vehicle = null;
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
@ -39,24 +29,25 @@ index 81ca499..7165579 100644
|
||||
+ if (entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4, true)) {
|
||||
// It's possible to move from one vehicle to another. We need to check if they're already in a vehicle, and fire an exit event if they are.
|
||||
VehicleExitEvent exitEvent = null;
|
||||
+ EntityDismountEvent exitEvent1 = null;
|
||||
+ org.spigotmc.event.entity.EntityDismountEvent exitEvent1 = null;
|
||||
if (this.vehicle != null) {
|
||||
- exitEvent = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
|
||||
+ if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle))
|
||||
- pluginManager.callEvent(exitEvent);
|
||||
+ if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle)) {
|
||||
+ exitEvent = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
|
||||
pluginManager.callEvent(exitEvent);
|
||||
+ pluginManager.callEvent(exitEvent);
|
||||
+
|
||||
+ if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ exitEvent1 = new org.spigotmc.event.entity.EntityDismountEvent(this.vehicle.getBukkitEntity(), this.bukkitEntity);
|
||||
+ pluginManager.callEvent(exitEvent1);
|
||||
|
||||
if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
- if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
+ if (exitEvent1.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ exitEvent1 = new EntityDismountEvent(this.vehicle.getBukkitEntity(), this.bukkitEntity);
|
||||
+
|
||||
+ pluginManager.callEvent(exitEvent1);
|
||||
+
|
||||
+ if (exitEvent1.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
- VehicleEnterEvent event = new VehicleEnterEvent((Vehicle) entity.getBukkitEntity(), this.bukkitEntity);
|
||||
@ -101,36 +92,25 @@ index 81ca499..7165579 100644
|
||||
if (this.vehicle != null) {
|
||||
this.vehicle.passenger = null;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index b861dbe..96b3905 100644
|
||||
index f75b0b1..19fc521 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -21,6 +21,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
||||
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||
+import org.spigotmc.event.entity.EntityDismountEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
@@ -1725,8 +1726,15 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1725,6 +1725,13 @@ public abstract class EntityLiving extends Entity {
|
||||
return;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ EntityDismountEvent event = new EntityDismountEvent(this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
|
||||
+ org.spigotmc.event.entity.EntityDismountEvent event = new org.spigotmc.event.entity.EntityDismountEvent(this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
|
||||
+ getBukkitEntity().getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled() || vehicle != originalVehicle) {
|
||||
+ return;
|
||||
+ }
|
||||
// CraftBukkit end
|
||||
-
|
||||
+
|
||||
if (!this.world.isClientSide) {
|
||||
this.q(this.vehicle);
|
||||
}
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index efbf1a8..dbc7b54 100644
|
||||
index efbf1a8..ad53590 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -141,19 +121,17 @@ index efbf1a8..dbc7b54 100644
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -234,6 +235,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -233,6 +234,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
// If this entity is riding another entity, we must dismount before teleporting.
|
||||
entity.mount(null);
|
||||
|
||||
+ if (!Doubles.isFinite(location.getX()) || !Doubles.isFinite(location.getY()) || !Doubles.isFinite(location.getZ()))
|
||||
+ {
|
||||
+ if (!Doubles.isFinite(location.getX()) || !Doubles.isFinite(location.getY()) || !Doubles.isFinite(location.getZ())) {
|
||||
+ Thread.dumpStack();
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
|
||||
// Spigot start
|
||||
if (!location.getWorld().equals(getWorld())) {
|
||||
entity.teleportTo(location, cause.equals(TeleportCause.NETHER_PORTAL));
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 3b4526267e3bd53d9e70578ec1c7a8cd13038e73 Mon Sep 17 00:00:00 2001
|
||||
From 6514e2834135adf7d133d11bbcad9377544d73f0 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 27 Nov 2015 22:26:34 +1300
|
||||
Subject: [PATCH] Server freezing, fix fake yaw/pitch
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7165579..4f366da 100644
|
||||
index 2a4f819..721d0e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
@ -16,7 +16,7 @@ index 7165579..4f366da 100644
|
||||
|
||||
// CraftBukkit start
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -153,6 +154,12 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -151,6 +152,12 @@ public abstract class Entity implements ICommandListener {
|
||||
public void setFakeHead(boolean fakeHead)
|
||||
{
|
||||
_fakeHead = fakeHead;
|
||||
@ -29,7 +29,7 @@ index 7165579..4f366da 100644
|
||||
}
|
||||
|
||||
public boolean isSilent()
|
||||
@@ -1024,9 +1031,18 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -1022,9 +1029,18 @@ public abstract class Entity implements ICommandListener {
|
||||
this.lastX = this.locX = d0;
|
||||
this.lastY = this.locY = d1;
|
||||
this.lastZ = this.locZ = d2;
|
||||
@ -64,5 +64,5 @@ index 5edef3e..d3b1586 100644
|
||||
} else {
|
||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 22472882d2708e0eb4e35f0d31978b70d2c4b4f5 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Tue, 12 Jan 2016 19:56:07 +1300
|
||||
Subject: [PATCH] Sound and vehicle fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 0cc8f9b..dd07600 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -14,9 +14,9 @@ public class CraftSound {
|
||||
set(AMBIENCE_RAIN, "ambient.weather.rain");
|
||||
set(AMBIENCE_THUNDER, "ambient.weather.thunder");
|
||||
// Damage
|
||||
- set(HURT_FLESH, "game.neutral.hurt");
|
||||
- set(FALL_BIG, "game.neutral.hurt.fall.big");
|
||||
- set(FALL_SMALL, "game.neutral.hurt.fall.small");
|
||||
+ set(HURT_FLESH, "game.player.hurt");
|
||||
+ set(FALL_BIG, "game.player.hurt.fall.big");
|
||||
+ set(FALL_SMALL, "game.player.hurt.fall.small");
|
||||
// Dig Sounds
|
||||
set(DIG_WOOL, "dig.cloth");
|
||||
set(DIG_GRASS, "dig.grass");
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3d0c2e6b1409ca0c42b7aafbffae4b517d7db48c Mon Sep 17 00:00:00 2001
|
||||
From 1e687cfb7b343f9c2a2e3cfdef346a896be747bb Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 29 Jan 2016 16:59:00 +1300
|
||||
Subject: [PATCH] md_5's player interaction for specs patch
|
||||
@ -27,5 +27,5 @@ index d3b1586..6fd49b3 100644
|
||||
// Arm swing animation
|
||||
PlayerAnimationEvent event = new PlayerAnimationEvent(this.getPlayer());
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c0e8d43f419d7f489cd0ae348618f897e95b0402 Mon Sep 17 00:00:00 2001
|
||||
From 125596ec9aee25d141781b4010eac881c7b36eb5 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 29 Jan 2016 16:59:12 +1300
|
||||
Subject: [PATCH] Fix enderman teleporting when vegetated
|
||||
@ -21,5 +21,5 @@ index a250062..5ad2d07 100644
|
||||
double d4 = this.locY;
|
||||
double d5 = this.locZ;
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
2.5.0
|
||||
|
@ -0,0 +1,327 @@
|
||||
From 742d6b5d828128519f06f7c6f5e188847263e609 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sun, 7 Feb 2016 20:28:54 +1100
|
||||
Subject: [PATCH] Implement Sentry for exception monitoring.
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index c1d1fb7..ceb3ec2 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -29,6 +29,12 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
+ <groupId>net.kencochrane.raven</groupId>
|
||||
+ <artifactId>raven-log4j2</artifactId>
|
||||
+ <version>6.0.0</version>
|
||||
+ <scope>compile</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
<groupId>net.sf.trove4j</groupId>
|
||||
<artifactId>trove4j</artifactId>
|
||||
<version>3.0.3</version>
|
||||
@@ -202,6 +208,20 @@
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
+ <filters>
|
||||
+ <filter>
|
||||
+ <artifact>*:*</artifact>
|
||||
+ <excludes>
|
||||
+ <exclude>META-INF/org/apache/logging/log4j/core/config/plugins/</exclude>
|
||||
+ </excludes>
|
||||
+ </filter>
|
||||
+ <filter>
|
||||
+ <artifact>*:minecraft-server</artifact>
|
||||
+ <excludes>
|
||||
+ <exclude>org/apache/logging/log4j/</exclude>
|
||||
+ </excludes>
|
||||
+ </filter>
|
||||
+ </filters>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>joptsimple</pattern>
|
||||
diff --git a/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java b/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
|
||||
deleted file mode 100644
|
||||
index 341eaa3..0000000
|
||||
--- a/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
|
||||
+++ /dev/null
|
||||
@@ -1,245 +0,0 @@
|
||||
-/*
|
||||
- * Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
- * contributor license agreements. See the NOTICE file distributed with
|
||||
- * this work for additional information regarding copyright ownership.
|
||||
- * The ASF licenses this file to You under the Apache license, Version 2.0
|
||||
- * (the "License"); you may not use this file except in compliance with
|
||||
- * the License. You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the license for the specific language governing permissions and
|
||||
- * limitations under the license.
|
||||
- */
|
||||
-package org.apache.logging.log4j.core.appender;
|
||||
-
|
||||
-import java.io.IOException;
|
||||
-import java.io.OutputStream;
|
||||
-import java.io.PrintStream;
|
||||
-import java.io.Serializable;
|
||||
-import java.io.UnsupportedEncodingException;
|
||||
-import java.lang.reflect.Constructor;
|
||||
-import java.nio.charset.Charset;
|
||||
-
|
||||
-import org.apache.logging.log4j.core.Filter;
|
||||
-import org.apache.logging.log4j.core.Layout;
|
||||
-import org.apache.logging.log4j.core.config.plugins.Plugin;
|
||||
-import org.apache.logging.log4j.core.config.plugins.PluginAttribute;
|
||||
-import org.apache.logging.log4j.core.config.plugins.PluginElement;
|
||||
-import org.apache.logging.log4j.core.config.plugins.PluginFactory;
|
||||
-import org.apache.logging.log4j.core.helpers.Booleans;
|
||||
-import org.apache.logging.log4j.core.helpers.Loader;
|
||||
-import org.apache.logging.log4j.core.layout.PatternLayout;
|
||||
-import org.apache.logging.log4j.util.PropertiesUtil;
|
||||
-
|
||||
-/**
|
||||
- * ConsoleAppender appends log events to <code>System.out</code> or
|
||||
- * <code>System.err</code> using a layout specified by the user. The
|
||||
- * default target is <code>System.out</code>.
|
||||
- * @doubt accessing System.out or .err as a byte stream instead of a writer
|
||||
- * bypasses the JVM's knowledge of the proper encoding. (RG) Encoding
|
||||
- * is handled within the Layout. Typically, a Layout will generate a String
|
||||
- * and then call getBytes which may use a configured encoding or the system
|
||||
- * default. OTOH, a Writer cannot print byte streams.
|
||||
- */
|
||||
-@Plugin(name = "Console", category = "Core", elementType = "appender", printObject = true)
|
||||
-public final class ConsoleAppender extends AbstractOutputStreamAppender {
|
||||
-
|
||||
- private static final String JANSI_CLASS = "org.fusesource.jansi.WindowsAnsiOutputStream";
|
||||
- private static ConsoleManagerFactory factory = new ConsoleManagerFactory();
|
||||
-
|
||||
- /**
|
||||
- * Enumeration of console destinations.
|
||||
- */
|
||||
- public enum Target {
|
||||
- /** Standard output. */
|
||||
- SYSTEM_OUT,
|
||||
- /** Standard error output. */
|
||||
- SYSTEM_ERR
|
||||
- }
|
||||
-
|
||||
- private ConsoleAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
|
||||
- final OutputStreamManager manager,
|
||||
- final boolean ignoreExceptions) {
|
||||
- super(name, layout, filter, ignoreExceptions, true, manager);
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Create a Console Appender.
|
||||
- * @param layout The layout to use (required).
|
||||
- * @param filter The Filter or null.
|
||||
- * @param t The target ("SYSTEM_OUT" or "SYSTEM_ERR"). The default is "SYSTEM_OUT".
|
||||
- * @param follow If true will follow changes to the underlying output stream.
|
||||
- * @param name The name of the Appender (required).
|
||||
- * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
|
||||
- * they are propagated to the caller.
|
||||
- * @return The ConsoleAppender.
|
||||
- */
|
||||
- @PluginFactory
|
||||
- public static ConsoleAppender createAppender(
|
||||
- @PluginElement("Layout") Layout<? extends Serializable> layout,
|
||||
- @PluginElement("Filters") final Filter filter,
|
||||
- @PluginAttribute("target") final String t,
|
||||
- @PluginAttribute("name") final String name,
|
||||
- @PluginAttribute("follow") final String follow,
|
||||
- @PluginAttribute("ignoreExceptions") final String ignore) {
|
||||
- if (name == null) {
|
||||
- LOGGER.error("No name provided for ConsoleAppender");
|
||||
- return null;
|
||||
- }
|
||||
- if (layout == null) {
|
||||
- layout = PatternLayout.createLayout(null, null, null, null, null);
|
||||
- }
|
||||
- final boolean isFollow = Boolean.parseBoolean(follow);
|
||||
- final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
|
||||
- final Target target = t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
|
||||
- return new ConsoleAppender(name, layout, filter, getManager(isFollow, target, layout), ignoreExceptions);
|
||||
- }
|
||||
-
|
||||
- private static OutputStreamManager getManager(final boolean follow, final Target target, final Layout<? extends Serializable> layout) {
|
||||
- final String type = target.name();
|
||||
- final OutputStream os = getOutputStream(follow, target);
|
||||
- return OutputStreamManager.getManager(target.name() + "." + follow, new FactoryData(os, type, layout), factory);
|
||||
- }
|
||||
-
|
||||
- private static OutputStream getOutputStream(final boolean follow, final Target target) {
|
||||
- final String enc = Charset.defaultCharset().name();
|
||||
- PrintStream printStream = null;
|
||||
- try {
|
||||
- printStream = target == Target.SYSTEM_OUT ?
|
||||
- follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
|
||||
- follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
|
||||
- } catch (final UnsupportedEncodingException ex) { // should never happen
|
||||
- throw new IllegalStateException("Unsupported default encoding " + enc, ex);
|
||||
- }
|
||||
- final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
|
||||
- if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
|
||||
- propsUtil.getBooleanProperty("log4j.skipJansi")) {
|
||||
- return printStream;
|
||||
- }
|
||||
- try {
|
||||
- final ClassLoader loader = Loader.getClassLoader();
|
||||
- // We type the parameter as a wildcard to avoid a hard reference to Jansi.
|
||||
- final Class<?> clazz = loader.loadClass(JANSI_CLASS);
|
||||
- final Constructor<?> constructor = clazz.getConstructor(OutputStream.class);
|
||||
- return (OutputStream) constructor.newInstance(printStream);
|
||||
- } catch (final ClassNotFoundException cnfe) {
|
||||
- LOGGER.debug("Jansi is not installed, cannot find {}", JANSI_CLASS);
|
||||
- } catch (final NoSuchMethodException nsme) {
|
||||
- LOGGER.warn("{} is missing the proper constructor", JANSI_CLASS);
|
||||
- } catch (final Throwable ex) { // CraftBukkit - Exception -> Throwable
|
||||
- LOGGER.warn("Unable to instantiate {}", JANSI_CLASS);
|
||||
- }
|
||||
- return printStream;
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * An implementation of OutputStream that redirects to the current System.err.
|
||||
- */
|
||||
- private static class SystemErrStream extends OutputStream {
|
||||
- public SystemErrStream() {
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void close() {
|
||||
- // do not close sys err!
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void flush() {
|
||||
- System.err.flush();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void write(final byte[] b) throws IOException {
|
||||
- System.err.write(b);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void write(final byte[] b, final int off, final int len)
|
||||
- throws IOException {
|
||||
- System.err.write(b, off, len);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void write(final int b) {
|
||||
- System.err.write(b);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * An implementation of OutputStream that redirects to the current System.out.
|
||||
- */
|
||||
- private static class SystemOutStream extends OutputStream {
|
||||
- public SystemOutStream() {
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void close() {
|
||||
- // do not close sys out!
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void flush() {
|
||||
- System.out.flush();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void write(final byte[] b) throws IOException {
|
||||
- System.out.write(b);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void write(final byte[] b, final int off, final int len)
|
||||
- throws IOException {
|
||||
- System.out.write(b, off, len);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void write(final int b) throws IOException {
|
||||
- System.out.write(b);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Data to pass to factory method.
|
||||
- */
|
||||
- private static class FactoryData {
|
||||
- private final OutputStream os;
|
||||
- private final String type;
|
||||
- private final Layout<? extends Serializable> layout;
|
||||
-
|
||||
- /**
|
||||
- * Constructor.
|
||||
- * @param os The OutputStream.
|
||||
- * @param type The name of the target.
|
||||
- * @param layout A Serializable layout
|
||||
- */
|
||||
- public FactoryData(final OutputStream os, final String type, final Layout<? extends Serializable> layout) {
|
||||
- this.os = os;
|
||||
- this.type = type;
|
||||
- this.layout = layout;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Factory to create the Appender.
|
||||
- */
|
||||
- private static class ConsoleManagerFactory implements ManagerFactory<OutputStreamManager, FactoryData> {
|
||||
-
|
||||
- /**
|
||||
- * Create an OutputStreamManager.
|
||||
- * @param name The name of the entity to manage.
|
||||
- * @param data The data required to create the entity.
|
||||
- * @return The OutputStreamManager
|
||||
- */
|
||||
- @Override
|
||||
- public OutputStreamManager createManager(final String name, final FactoryData data) {
|
||||
- return new OutputStreamManager(data.os, data.type, data.layout);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-}
|
||||
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
||||
index f37d1c2..b9d8704 100644
|
||||
--- a/src/main/resources/log4j2.xml
|
||||
+++ b/src/main/resources/log4j2.xml
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
-<Configuration status="WARN" packages="com.mojang.util">
|
||||
+<Configuration status="WARN" packages="com.mojang.util,net.kencochrane.raven.log4j2">
|
||||
<Appenders>
|
||||
<Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console>
|
||||
<Queue name="TerminalConsole">
|
||||
@@ -12,6 +12,9 @@
|
||||
<OnStartupTriggeringPolicy />
|
||||
</Policies>
|
||||
</RollingRandomAccessFile>
|
||||
+ <Raven name="Sentry">
|
||||
+ <dsn>https://9dbb188a495a4145998c3478534c7052:89fefe0909f34090a6a7ad9397a31bd7@app.getsentry.com/66319</dsn>
|
||||
+ </Raven>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
@@ -21,6 +24,7 @@
|
||||
<AppenderRef ref="WINDOWS_COMPAT" level="info"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="TerminalConsole" level="info"/>
|
||||
+ <AppenderRef ref="Sentry" level="error"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,428 +0,0 @@
|
||||
From 702360d29859ed580b44255ccb7f2f124e6aa24b Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 23 Oct 2015 21:22:36 +1300
|
||||
Subject: [PATCH] Inventory changes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
index e9a3c50..9fd6359 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
@@ -441,8 +441,8 @@ public class CraftInventory implements Inventory {
|
||||
return InventoryType.ENCHANTING;
|
||||
} else if (inventory instanceof TileEntityBrewingStand) {
|
||||
return InventoryType.BREWING;
|
||||
- } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
|
||||
- return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
|
||||
+ } else if (inventory instanceof MinecraftInventory) {
|
||||
+ return ((MinecraftInventory) inventory).getType();
|
||||
} else if (inventory instanceof InventoryEnderChest) {
|
||||
return InventoryType.ENDER_CHEST;
|
||||
} else if (inventory instanceof InventoryMerchant) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||
index 947c493..eed9afa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||
@@ -31,168 +31,4 @@ public class CraftInventoryCustom extends CraftInventory {
|
||||
public CraftInventoryCustom(InventoryHolder owner, int size, String title) {
|
||||
super(new MinecraftInventory(owner, size, title));
|
||||
}
|
||||
-
|
||||
- static class MinecraftInventory implements IInventory {
|
||||
- private final ItemStack[] items;
|
||||
- private int maxStack = MAX_STACK;
|
||||
- private final List<HumanEntity> viewers;
|
||||
- private final String title;
|
||||
- private InventoryType type;
|
||||
- private final InventoryHolder owner;
|
||||
-
|
||||
- public MinecraftInventory(InventoryHolder owner, InventoryType type) {
|
||||
- this(owner, type.getDefaultSize(), type.getDefaultTitle());
|
||||
- this.type = type;
|
||||
- }
|
||||
-
|
||||
- public MinecraftInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
- this(owner, type.getDefaultSize(), title);
|
||||
- this.type = type;
|
||||
- }
|
||||
-
|
||||
- public MinecraftInventory(InventoryHolder owner, int size) {
|
||||
- this(owner, size, "Chest");
|
||||
- }
|
||||
-
|
||||
- public MinecraftInventory(InventoryHolder owner, int size, String title) {
|
||||
- Validate.notNull(title, "Title cannot be null");
|
||||
- Validate.isTrue(title.length() <= 32, "Title cannot be longer than 32 characters");
|
||||
- this.items = new ItemStack[size];
|
||||
- this.title = title;
|
||||
- this.viewers = new ArrayList<HumanEntity>();
|
||||
- this.owner = owner;
|
||||
- this.type = InventoryType.CHEST;
|
||||
- }
|
||||
-
|
||||
- public int getSize() {
|
||||
- return items.length;
|
||||
- }
|
||||
-
|
||||
- public ItemStack getItem(int i) {
|
||||
- return items[i];
|
||||
- }
|
||||
-
|
||||
- public ItemStack splitStack(int i, int j) {
|
||||
- ItemStack stack = this.getItem(i);
|
||||
- ItemStack result;
|
||||
- if (stack == null) return null;
|
||||
- if (stack.count <= j) {
|
||||
- this.setItem(i, null);
|
||||
- result = stack;
|
||||
- } else {
|
||||
- result = CraftItemStack.copyNMSStack(stack, j);
|
||||
- stack.count -= j;
|
||||
- }
|
||||
- this.update();
|
||||
- return result;
|
||||
- }
|
||||
-
|
||||
- public ItemStack splitWithoutUpdate(int i) {
|
||||
- ItemStack stack = this.getItem(i);
|
||||
- ItemStack result;
|
||||
- if (stack == null) return null;
|
||||
- if (stack.count <= 1) {
|
||||
- this.setItem(i, null);
|
||||
- result = stack;
|
||||
- } else {
|
||||
- result = CraftItemStack.copyNMSStack(stack, 1);
|
||||
- stack.count -= 1;
|
||||
- }
|
||||
- return result;
|
||||
- }
|
||||
-
|
||||
- public void setItem(int i, ItemStack itemstack) {
|
||||
- items[i] = itemstack;
|
||||
- if (itemstack != null && this.getMaxStackSize() > 0 && itemstack.count > this.getMaxStackSize()) {
|
||||
- itemstack.count = this.getMaxStackSize();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public int getMaxStackSize() {
|
||||
- return maxStack;
|
||||
- }
|
||||
-
|
||||
- public void setMaxStackSize(int size) {
|
||||
- maxStack = size;
|
||||
- }
|
||||
-
|
||||
- public void update() {}
|
||||
-
|
||||
- public boolean a(EntityHuman entityhuman) {
|
||||
- return true;
|
||||
- }
|
||||
-
|
||||
- public ItemStack[] getContents() {
|
||||
- return items;
|
||||
- }
|
||||
-
|
||||
- public void onOpen(CraftHumanEntity who) {
|
||||
- viewers.add(who);
|
||||
- }
|
||||
-
|
||||
- public void onClose(CraftHumanEntity who) {
|
||||
- viewers.remove(who);
|
||||
- }
|
||||
-
|
||||
- public List<HumanEntity> getViewers() {
|
||||
- return viewers;
|
||||
- }
|
||||
-
|
||||
- public InventoryType getType() {
|
||||
- return type;
|
||||
- }
|
||||
-
|
||||
- public InventoryHolder getOwner() {
|
||||
- return owner;
|
||||
- }
|
||||
-
|
||||
- public boolean b(int i, ItemStack itemstack) {
|
||||
- return true;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void startOpen(EntityHuman entityHuman) {
|
||||
-
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void closeContainer(EntityHuman entityHuman) {
|
||||
-
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public int getProperty(int i) {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void b(int i, int i1) {
|
||||
-
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public int g() {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void l() {
|
||||
-
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public String getName() {
|
||||
- return title;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean hasCustomName() {
|
||||
- return title != null;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public IChatBaseComponent getScoreboardDisplayName() {
|
||||
- return new ChatComponentText(title);
|
||||
- }
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 23f05f4..fdaf026 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.server.NBTTagString;
|
||||
import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
|
||||
@DelegateDeserialization(ItemStack.class)
|
||||
-public final class CraftItemStack extends ItemStack {
|
||||
+public class CraftItemStack extends ItemStack {
|
||||
|
||||
public static net.minecraft.server.ItemStack asNMSCopy(ItemStack original) {
|
||||
if (original instanceof CraftItemStack) {
|
||||
@@ -95,26 +95,30 @@ public final class CraftItemStack extends ItemStack {
|
||||
/**
|
||||
* Mirror
|
||||
*/
|
||||
- private CraftItemStack(net.minecraft.server.ItemStack item) {
|
||||
+ protected CraftItemStack(net.minecraft.server.ItemStack item) {
|
||||
this.handle = item;
|
||||
}
|
||||
|
||||
- private CraftItemStack(ItemStack item) {
|
||||
+ protected CraftItemStack(ItemStack item) {
|
||||
this(item.getTypeId(), item.getAmount(), item.getDurability(), item.hasItemMeta() ? item.getItemMeta() : null);
|
||||
}
|
||||
|
||||
- private CraftItemStack(Material type, int amount, short durability, ItemMeta itemMeta) {
|
||||
+ protected CraftItemStack(Material type, int amount, short durability, ItemMeta itemMeta) {
|
||||
setType(type);
|
||||
setAmount(amount);
|
||||
setDurability(durability);
|
||||
setItemMeta(itemMeta);
|
||||
}
|
||||
|
||||
- private CraftItemStack(int typeId, int amount, short durability, ItemMeta itemMeta) {
|
||||
+ protected CraftItemStack(int typeId, int amount, short durability, ItemMeta itemMeta) {
|
||||
this(Material.getMaterial(typeId), amount, durability, itemMeta);
|
||||
|
||||
}
|
||||
|
||||
+ public net.minecraft.server.ItemStack getHandle() {
|
||||
+ return handle;
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
public int getTypeId() {
|
||||
return handle != null ? CraftMagicNumbers.getId(handle.getItem()) : 0;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/MinecraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/MinecraftInventory.java
|
||||
new file mode 100644
|
||||
index 0000000..f0d8f81
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/MinecraftInventory.java
|
||||
@@ -0,0 +1,177 @@
|
||||
+package org.bukkit.craftbukkit.inventory;
|
||||
+
|
||||
+import net.minecraft.server.*;
|
||||
+import org.apache.commons.lang.Validate;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+import org.bukkit.event.inventory.InventoryType;
|
||||
+import org.bukkit.inventory.InventoryHolder;
|
||||
+
|
||||
+import java.util.ArrayList;
|
||||
+import java.util.List;
|
||||
+
|
||||
+public class MinecraftInventory implements IInventory
|
||||
+{
|
||||
+ private final ItemStack[] items;
|
||||
+ private int maxStack = MAX_STACK;
|
||||
+ private final List<HumanEntity> viewers;
|
||||
+ private final String title;
|
||||
+ private InventoryType type;
|
||||
+ private final InventoryHolder owner;
|
||||
+
|
||||
+ public MinecraftInventory(InventoryHolder owner, InventoryType type) {
|
||||
+ this(owner, type.getDefaultSize(), type.getDefaultTitle());
|
||||
+ this.type = type;
|
||||
+ }
|
||||
+
|
||||
+ public MinecraftInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
+ this(owner, type.getDefaultSize(), title);
|
||||
+ this.type = type;
|
||||
+ }
|
||||
+
|
||||
+ public MinecraftInventory(InventoryHolder owner, int size) {
|
||||
+ this(owner, size, "Chest");
|
||||
+ }
|
||||
+
|
||||
+ public MinecraftInventory(InventoryHolder owner, int size, String title) {
|
||||
+ Validate.notNull(title, "Title cannot be null");
|
||||
+ Validate.isTrue(title.length() <= 32, "Title cannot be longer than 32 characters");
|
||||
+ this.items = new ItemStack[size];
|
||||
+ this.title = title;
|
||||
+ this.viewers = new ArrayList<HumanEntity>();
|
||||
+ this.owner = owner;
|
||||
+ this.type = InventoryType.CHEST;
|
||||
+ }
|
||||
+
|
||||
+ public int getSize() {
|
||||
+ return items.length;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack getItem(int i) {
|
||||
+ return items[i];
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack splitStack(int i, int j) {
|
||||
+ ItemStack stack = this.getItem(i);
|
||||
+ ItemStack result;
|
||||
+ if (stack == null) return null;
|
||||
+ if (stack.count <= j) {
|
||||
+ this.setItem(i, null);
|
||||
+ result = stack;
|
||||
+ } else {
|
||||
+ result = CraftItemStack.copyNMSStack(stack, j);
|
||||
+ stack.count -= j;
|
||||
+ }
|
||||
+ this.update();
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack splitWithoutUpdate(int i) {
|
||||
+ ItemStack stack = this.getItem(i);
|
||||
+ ItemStack result;
|
||||
+ if (stack == null) return null;
|
||||
+ if (stack.count <= 1) {
|
||||
+ this.setItem(i, null);
|
||||
+ result = stack;
|
||||
+ } else {
|
||||
+ result = CraftItemStack.copyNMSStack(stack, 1);
|
||||
+ stack.count -= 1;
|
||||
+ }
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ public void setItem(int i, ItemStack itemstack) {
|
||||
+ items[i] = itemstack;
|
||||
+ if (itemstack != null && this.getMaxStackSize() > 0 && itemstack.count > this.getMaxStackSize()) {
|
||||
+ itemstack.count = this.getMaxStackSize();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public int getMaxStackSize() {
|
||||
+ return maxStack;
|
||||
+ }
|
||||
+
|
||||
+ public void setMaxStackSize(int size) {
|
||||
+ maxStack = size;
|
||||
+ }
|
||||
+
|
||||
+ public void update() {}
|
||||
+
|
||||
+ public boolean a(EntityHuman entityhuman) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack[] getContents() {
|
||||
+ return items;
|
||||
+ }
|
||||
+
|
||||
+ public void onOpen(CraftHumanEntity who) {
|
||||
+ viewers.add(who);
|
||||
+ }
|
||||
+
|
||||
+ public void onClose(CraftHumanEntity who) {
|
||||
+ viewers.remove(who);
|
||||
+ }
|
||||
+
|
||||
+ public List<HumanEntity> getViewers() {
|
||||
+ return viewers;
|
||||
+ }
|
||||
+
|
||||
+ public InventoryType getType() {
|
||||
+ return type;
|
||||
+ }
|
||||
+
|
||||
+ public InventoryHolder getOwner() {
|
||||
+ return owner;
|
||||
+ }
|
||||
+
|
||||
+ public boolean b(int i, ItemStack itemstack) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void startOpen(EntityHuman entityHuman) {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void closeContainer(EntityHuman entityHuman) {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getProperty(int i) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void b(int i, int i1) {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int g() {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void l() {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getName() {
|
||||
+ return title;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean hasCustomName() {
|
||||
+ return title != null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public IChatBaseComponent getScoreboardDisplayName() {
|
||||
+ return new ChatComponentText(title);
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 2522a926e6cc670f4f10657ea5494b5ffe81eb37 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Tue, 12 Jan 2016 19:56:07 +1300
|
||||
Subject: [PATCH] Sound and vehicle fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 4f366da..fc9cce0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1628,11 +1628,13 @@ public abstract class Entity implements ICommandListener {
|
||||
EntityDismountEvent exitEvent1 = null;
|
||||
if (this.vehicle != null) {
|
||||
if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle))
|
||||
+ {
|
||||
exitEvent = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
|
||||
- pluginManager.callEvent(exitEvent);
|
||||
+ pluginManager.callEvent(exitEvent);
|
||||
|
||||
- if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
- return;
|
||||
+ if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
exitEvent1 = new EntityDismountEvent(this.vehicle.getBukkitEntity(), this.bukkitEntity);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 0cc8f9b..dd07600 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -14,9 +14,9 @@ public class CraftSound {
|
||||
set(AMBIENCE_RAIN, "ambient.weather.rain");
|
||||
set(AMBIENCE_THUNDER, "ambient.weather.thunder");
|
||||
// Damage
|
||||
- set(HURT_FLESH, "game.neutral.hurt");
|
||||
- set(FALL_BIG, "game.neutral.hurt.fall.big");
|
||||
- set(FALL_SMALL, "game.neutral.hurt.fall.small");
|
||||
+ set(HURT_FLESH, "game.player.hurt");
|
||||
+ set(FALL_BIG, "game.player.hurt.fall.big");
|
||||
+ set(FALL_SMALL, "game.player.hurt.fall.small");
|
||||
// Dig Sounds
|
||||
set(DIG_WOOL, "dig.cloth");
|
||||
set(DIG_GRASS, "dig.grass");
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
Binary file not shown.
@ -28,6 +28,10 @@
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kencochrane.raven</groupId>
|
||||
<artifactId>raven-log4j2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-proxy</artifactId>
|
||||
|
@ -1,11 +1,15 @@
|
||||
package mineplex.bungee;
|
||||
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import mineplex.bungee.lobbyBalancer.LobbyBalancer;
|
||||
import mineplex.bungee.motd.MotdManager;
|
||||
import mineplex.bungee.playerCount.PlayerCount;
|
||||
import mineplex.bungee.playerStats.PlayerStats;
|
||||
import mineplex.bungee.playerTracker.PlayerTracker;
|
||||
import mineplex.bungee.status.InternetStatus;
|
||||
import net.kencochrane.raven.RavenFactory;
|
||||
import net.kencochrane.raven.jul.SentryHandler;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
public class Mineplexer extends Plugin
|
||||
@ -13,6 +17,11 @@ public class Mineplexer extends Plugin
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
// Sentry setup
|
||||
Handler sentry = new SentryHandler(RavenFactory.ravenInstance("https://470f12378af3453ba089e0c0a0c9aae6:292516b722594784807aebb06db8ec38@app.getsentry.com/66323"));
|
||||
sentry.setLevel(Level.WARNING);
|
||||
getProxy().getLogger().addHandler(sentry);
|
||||
|
||||
new MotdManager(this);
|
||||
new LobbyBalancer(this);
|
||||
PlayerCount playerCount = new PlayerCount(this);
|
||||
|
@ -30,11 +30,11 @@ public enum Achievement
|
||||
new int[]{200},
|
||||
AchievementCategory.HOLIDAY),
|
||||
|
||||
GLOBAL_GIFT_GIVER_2016("2016 Gift Giver", 2000,
|
||||
GLOBAL_GIFT_GIVER_2016("2016 Gift Giver", 0,
|
||||
new String[]{"Global.Valentines2016.GiftsGiven"},
|
||||
new String[]{"Give 50 Valentines Gifts",
|
||||
new String[]{"Give 3 Valentines Gifts",
|
||||
"during Valentines 2016!"},
|
||||
new int[]{50},
|
||||
new int[]{3},
|
||||
AchievementCategory.HOLIDAY),
|
||||
|
||||
GLOBAL_GIFT_GETTER_2016("2016 People Love Me", 2000,
|
||||
|
@ -199,7 +199,7 @@ public class AchievementManager extends MiniPlugin
|
||||
level = Math.max(level, 50 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel());
|
||||
|
||||
if (sender.getName().equalsIgnoreCase("Phinary"))
|
||||
level = -level;
|
||||
level = 0;
|
||||
|
||||
return level;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class Chat extends MiniPlugin
|
||||
private AchievementManager _achievements;
|
||||
|
||||
private String[] _hackusations = {"hack", "hax", "hacker", "hacking", "cheat", "cheater", "cheating", "forcefield", "flyhack", "flyhacking", "autoclick", "aimbot"};
|
||||
private String _filterUrl = "https://10.33.53.5:8003/content/item/moderate";
|
||||
private String _filterUrl = "https://chat.mineplex.com:8003/content/item/moderate";
|
||||
private String _appId = "34018d65-466d-4a91-8e92-29ca49f022c4";
|
||||
private String _apiKey = "oUywMpwZcIzZO5AWnfDx";
|
||||
private String _serverName;
|
||||
@ -276,7 +276,7 @@ public class Chat extends MiniPlugin
|
||||
*/
|
||||
|
||||
String filteredMsg = "";
|
||||
|
||||
|
||||
filteredMsg = ((JSONObject) JSONValue.parse(response)).get("content").toString();
|
||||
if (filteredMsg.contains("parts"))
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ public class RewardManager
|
||||
}
|
||||
|
||||
// Valentines
|
||||
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Cupid's Arrows", "Cupid Arrow", 1, 5,
|
||||
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Cupid's Arrows", "Cupid's Arrows", 1, 5,
|
||||
new ItemStack(Material.BOW, 1), rarity, 300, 0));
|
||||
// Pets
|
||||
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Cow Pet", "Cow",
|
||||
@ -405,7 +405,7 @@ public class RewardManager
|
||||
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Particles", "Heartfelt Halo", "Heartfelt Halo",
|
||||
new ItemStack(Material.POTION), rarity, 100, _rareShards));
|
||||
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Love Potion", "Love Potion", 1, 1,
|
||||
new ItemStack(Material.POTION, 1), rarity, 1, 0));
|
||||
new ItemStack(Material.POTION, 1), rarity, 2, 0));
|
||||
|
||||
// Christmas
|
||||
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "The Grinch", "The Grinch",
|
||||
|
@ -60,8 +60,8 @@ public class ValentinesGiftManager extends MiniPlugin
|
||||
final int toId = _clientManager.getAccountId(to);
|
||||
|
||||
runAsync(() -> {
|
||||
// final boolean complete = _repository.giveGift(fromId, toId);
|
||||
final boolean complete = true;
|
||||
final boolean complete = _repository.giveGift(fromId, toId);
|
||||
// final boolean complete = true;
|
||||
runSync(() -> giveGift(from, to, complete));
|
||||
});
|
||||
}
|
||||
@ -92,10 +92,10 @@ public class ValentinesGiftManager extends MiniPlugin
|
||||
@Override
|
||||
public void run(RewardData fromData)
|
||||
{
|
||||
|
||||
|
||||
String fromGift = ChatColor.stripColor(fromData.getFriendlyName());
|
||||
_effects.add(new GiftEffect(from, to, fromGift, toGift, UtilAlg.getMidpoint(to.getLocation(), from.getLocation())));
|
||||
|
||||
incrementStat(from, to);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -77,11 +77,11 @@ public class ValentinesManager extends MiniPlugin
|
||||
return;
|
||||
}
|
||||
|
||||
// if (_donation.Get(player).OwnsUnknownPackage(_reward))
|
||||
// {
|
||||
// UtilPlayer.message(player, F.main(_prefix, "I already love you!"));
|
||||
// return;
|
||||
// }
|
||||
if (_donation.Get(player).OwnsUnknownPackage(_reward))
|
||||
{
|
||||
UtilPlayer.message(player, F.main(_prefix, "I already love you!"));
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(false); // Uncancel
|
||||
|
||||
|
@ -406,7 +406,7 @@ public class Valentines extends SoloGame
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
|
||||
int toSpawn = GetPlayers(true).size()-_playersOutPerRound;
|
||||
int toSpawn = Math.max(1, GetPlayers(true).size()-_playersOutPerRound);
|
||||
|
||||
if (toSpawn == 1)
|
||||
_finalRound = true;
|
||||
@ -464,7 +464,7 @@ public class Valentines extends SoloGame
|
||||
Location target = pig.getLocation();
|
||||
target.add(pig.getPassenger().getLocation().getDirection().multiply(5));
|
||||
|
||||
UtilEnt.CreatureMoveFast(pig, target, 2);
|
||||
UtilEnt.CreatureMoveFast(pig, target, 1.3f);
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -548,7 +548,7 @@ public class Valentines extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
UtilEnt.CreatureMoveFast(pig, target, 1.5f + (float)(1f * closestDist));
|
||||
UtilEnt.CreatureMoveFast(pig, target, 1.3f + (float)(1f * closestDist));
|
||||
}
|
||||
}
|
||||
|
||||
@ -599,8 +599,10 @@ public class Valentines extends SoloGame
|
||||
{
|
||||
if (UtilTime.elapsed(_roundTime, _roundTimeLimit) || (_pigs.isEmpty() && _hasItem.isEmpty()))
|
||||
{
|
||||
/*
|
||||
if (_completedRound.isEmpty())
|
||||
{
|
||||
System.out.println("RoundUpdate:604");
|
||||
//Announce
|
||||
AnnounceEnd(new ArrayList<Player>());
|
||||
|
||||
@ -609,6 +611,7 @@ public class Valentines extends SoloGame
|
||||
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
//Kill Failed Players
|
||||
for (Player player : GetPlayers(true))
|
||||
@ -756,7 +759,8 @@ public class Valentines extends SoloGame
|
||||
if (GetPlayers(true).size() == 1)
|
||||
{
|
||||
ArrayList<Player> places = _players.GetPlacements(true);
|
||||
|
||||
|
||||
System.out.println("EndCheck:760");
|
||||
//Announce
|
||||
AnnounceEnd(places);
|
||||
|
||||
@ -830,10 +834,13 @@ public class Valentines extends SoloGame
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
String message = _finalRound ? "Bring the Pig to Calvin!" : "Return " + _item.getTitle() + " to Calvin!";
|
||||
if (_item != null)
|
||||
{
|
||||
String message = _finalRound ? "Bring the Pig to Calvin!" : "Return " + _item.getTitle() + " to Calvin!";
|
||||
|
||||
Player[] players = GetPlayers(true).stream().filter(this::canReturnToCow).toArray(size -> new Player[size]);
|
||||
UtilTextMiddle.display("", C.cGreen + message, players);
|
||||
Player[] players = GetPlayers(true).stream().filter(this::canReturnToCow).toArray(size -> new Player[size]);
|
||||
UtilTextMiddle.display("", C.cGreen + message, players);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canReturnToCow(Player player)
|
||||
|
@ -77,6 +77,12 @@
|
||||
<version>1.4.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kencochrane.raven</groupId>
|
||||
<artifactId>raven-log4j2</artifactId>
|
||||
<version>6.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-proxy</artifactId>
|
||||
|
Loading…
Reference in New Issue
Block a user