mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-26 02:28:03 +01:00
Update for 1.1-R3
Includes fix from R2 as a breakage was introduced, but does not work with R2 because it also does not include the workaround for invalid block type being returned by BlockPlaceEvent. Closes #57
This commit is contained in:
parent
f3283de8dd
commit
b695f9ed27
4
pom.xml
4
pom.xml
@ -107,14 +107,14 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.1-R3-SNAPSHOT</version>
|
||||
<version>1.1-R4-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.1-R2</version>
|
||||
<version>1.1-R3</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
@ -73,11 +73,11 @@ public class mcBlockListener implements Listener
|
||||
}
|
||||
|
||||
//Check if the blocks placed should be monitored so they do not give out XP in the future
|
||||
if(m.shouldBeWatched(event.getItemInHand().getTypeId())) // Modified for terrible hack for R2 issue
|
||||
if(m.shouldBeWatched(block))
|
||||
{
|
||||
if(block.getTypeId() != 17 && block.getTypeId() != 39 && block.getTypeId() != 40 && block.getTypeId() != 91 && block.getTypeId() != 86) {
|
||||
//block.setData((byte) 5); //Change the byte
|
||||
//The following is a method to get around a breakage in 1.1-R2,
|
||||
//The following is a method to get around a breakage in 1.1-R2 and onward
|
||||
//it should be removed as soon as functionality to change a block
|
||||
//in this event returns.
|
||||
plugin.changeQueue.push(block);
|
||||
|
@ -101,7 +101,7 @@ public class mcMMO extends JavaPlugin
|
||||
//Jar stuff
|
||||
public static File mcmmo;
|
||||
|
||||
//Queue for block data change for R2 workaround
|
||||
//Queue for block data change for R2+ fix
|
||||
public ArrayDeque<Block> changeQueue = new ArrayDeque<Block>();
|
||||
|
||||
public void onEnable()
|
||||
@ -164,7 +164,7 @@ public class mcMMO extends JavaPlugin
|
||||
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, mcMMO_Timer, 0, 20);
|
||||
//R2 block place workaround
|
||||
//R2+ block place fix
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, ChangeDataValueTimer, 0, 10);
|
||||
|
||||
registerCommands();
|
||||
|
Loading…
Reference in New Issue
Block a user