Skip to content

Commit

Permalink
Merge pull request #9 from PoutineQc/Update
Browse files Browse the repository at this point in the history
No Damage Bug
  • Loading branch information
ChagnonSebastien committed May 27, 2016
2 parents 71c4f25 + 50abc55 commit 83693d9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Bukkit_1.8/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CubeRunner
main : me.poutineqc.cuberunner.CubeRunner
version: 2.1.1
version: 2.1
description: Blocks are falling over your head! Can you outrun them?
load: startup
author: PoutineQc
Expand Down
9 changes: 4 additions & 5 deletions Bukkit_1.8/src/me/poutineqc/cuberunner/games/Arena.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.FallingSand;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
Expand All @@ -42,6 +42,7 @@
import net.minecraft.server.v1_8_R3.PacketPlayOutTitle.EnumTitleAction;
import net.minecraft.server.v1_8_R3.PlayerConnection;

@SuppressWarnings("deprecation")
public class Arena {

private static CubeRunner plugin;
Expand Down Expand Up @@ -671,7 +672,6 @@ protected void startGame() {

}

@SuppressWarnings("deprecation")
private void resetArena() {
for (int x = minPoint.getBlockX(); x <= maxPoint.getBlockX(); x++)
for (int y = maxPoint.getBlockY(); y >= minPoint.getBlockY(); y--)
Expand All @@ -691,7 +691,6 @@ private void resetArena() {
}
}

@SuppressWarnings("deprecation")
public void resetArena(ItemStack item) {
for (int x = minPoint.getBlockX(); x <= maxPoint.getBlockX(); x++)
for (int y = maxPoint.getBlockY(); y >= minPoint.getBlockY(); y--)
Expand Down Expand Up @@ -774,11 +773,11 @@ public void run() {

ItemStackManager fallingBlock = arena.colorManager.getRandomAvailableBlock();

@SuppressWarnings("deprecation")
FallingBlock clay = (FallingBlock) player.getWorld().spawnFallingBlock(l,
FallingSand clay = (FallingSand) player.getWorld().spawnFallingBlock(l,
fallingBlock.getMaterial(), (byte) fallingBlock.getData());

clay.setDropItem(false);
clay.setHurtEntities(true);
clay.setCustomName(user.getUUID());
clay.setCustomNameVisible(false);

Expand Down
2 changes: 1 addition & 1 deletion Bukkit_1.9/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CubeRunner
main : me.poutineqc.cuberunner.CubeRunner
version: 2.1.2
version: 2.1
description: Blocks are falling over your head! Can you outrun them?
load: startup
author: PoutineQc
Expand Down
9 changes: 4 additions & 5 deletions Bukkit_1.9/src/me/poutineqc/cuberunner/games/Arena.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.FallingSand;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
Expand All @@ -42,6 +42,7 @@
import net.minecraft.server.v1_9_R1.PacketPlayOutTitle.EnumTitleAction;
import net.minecraft.server.v1_9_R1.PlayerConnection;

@SuppressWarnings("deprecation")
public class Arena {

private static CubeRunner plugin;
Expand Down Expand Up @@ -671,7 +672,6 @@ protected void startGame() {

}

@SuppressWarnings("deprecation")
private void resetArena() {
for (int x = minPoint.getBlockX(); x <= maxPoint.getBlockX(); x++)
for (int y = maxPoint.getBlockY(); y >= minPoint.getBlockY(); y--)
Expand All @@ -691,7 +691,6 @@ private void resetArena() {
}
}

@SuppressWarnings("deprecation")
public void resetArena(ItemStack item) {
for (int x = minPoint.getBlockX(); x <= maxPoint.getBlockX(); x++)
for (int y = maxPoint.getBlockY(); y >= minPoint.getBlockY(); y--)
Expand Down Expand Up @@ -774,11 +773,11 @@ public void run() {

ItemStackManager fallingBlock = arena.colorManager.getRandomAvailableBlock();

@SuppressWarnings("deprecation")
FallingBlock clay = (FallingBlock) player.getWorld().spawnFallingBlock(l,
FallingSand clay = (FallingSand) player.getWorld().spawnFallingBlock(l,
fallingBlock.getMaterial(), (byte) fallingBlock.getData());

clay.setDropItem(false);
clay.setHurtEntities(true);
clay.setCustomName(user.getUUID());
clay.setCustomNameVisible(false);

Expand Down

0 comments on commit 83693d9

Please sign in to comment.