Run Minestrike in Adventure Mode
This commit is contained in:
parent
ee6e6837ac
commit
66eeae2a54
@ -345,7 +345,7 @@ public class DamageManager extends MiniPlugin
|
|||||||
Player damagee = event.GetDamageePlayer();
|
Player damagee = event.GetDamageePlayer();
|
||||||
|
|
||||||
//Not Survival
|
//Not Survival
|
||||||
if (damagee.getGameMode() != GameMode.SURVIVAL)
|
if (damagee.getGameMode() != GameMode.SURVIVAL && damagee.getGameMode() != GameMode.ADVENTURE)
|
||||||
{
|
{
|
||||||
event.SetCancelled("Damagee in Creative");
|
event.SetCancelled("Damagee in Creative");
|
||||||
return;
|
return;
|
||||||
@ -373,7 +373,7 @@ public class DamageManager extends MiniPlugin
|
|||||||
Player damager = event.GetDamagerPlayer(true);
|
Player damager = event.GetDamagerPlayer(true);
|
||||||
|
|
||||||
//Not Survival
|
//Not Survival
|
||||||
if (damager.getGameMode() != GameMode.SURVIVAL)
|
if (damager.getGameMode() != GameMode.SURVIVAL && damager.getGameMode() != GameMode.ADVENTURE)
|
||||||
{
|
{
|
||||||
event.SetCancelled("Damager in Creative");
|
event.SetCancelled("Damager in Creative");
|
||||||
return;
|
return;
|
||||||
|
@ -7,6 +7,7 @@ import java.util.HashSet;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
@ -248,9 +249,8 @@ public class Minestrike extends TeamGame
|
|||||||
GameTeam team = GetTeam(event.getPlayer());
|
GameTeam team = GetTeam(event.getPlayer());
|
||||||
if (team == null)
|
if (team == null)
|
||||||
return;
|
return;
|
||||||
|
GadgetManager gadgetManager = Manager.getCosmeticManager().getGadgetManager();
|
||||||
GadgetManager gadgetManager = Manager.getCosmeticManager().getGadgetManager();
|
GameModifierMineStrikeSkin knifeSkin = (GameModifierMineStrikeSkin) gadgetManager.getActiveGameModifier(event.getPlayer(),
|
||||||
GameModifierMineStrikeSkin knifeSkin = (GameModifierMineStrikeSkin) gadgetManager.getActiveGameModifier(event.getPlayer(),
|
|
||||||
GameModifierType.MineStrike, GameModifierMineStrikeSkin.getWeaponFilter("Knife"));
|
GameModifierType.MineStrike, GameModifierMineStrikeSkin.getWeaponFilter("Knife"));
|
||||||
|
|
||||||
Material mat = Material.IRON_AXE;
|
Material mat = Material.IRON_AXE;
|
||||||
@ -270,6 +270,7 @@ public class Minestrike extends TeamGame
|
|||||||
{
|
{
|
||||||
if (IsAlive(event.getPlayer()))
|
if (IsAlive(event.getPlayer()))
|
||||||
{
|
{
|
||||||
|
event.getPlayer().setGameMode(GameMode.ADVENTURE);
|
||||||
//Pistol
|
//Pistol
|
||||||
Gun gun = new Gun(GunStats.GLOCK_18, _gunModule);
|
Gun gun = new Gun(GunStats.GLOCK_18, _gunModule);
|
||||||
_gunModule.registerGun(gun, event.getPlayer());
|
_gunModule.registerGun(gun, event.getPlayer());
|
||||||
@ -290,6 +291,7 @@ public class Minestrike extends TeamGame
|
|||||||
{
|
{
|
||||||
if (IsAlive(event.getPlayer()))
|
if (IsAlive(event.getPlayer()))
|
||||||
{
|
{
|
||||||
|
event.getPlayer().setGameMode(GameMode.ADVENTURE);
|
||||||
//Pistol
|
//Pistol
|
||||||
Gun gun = new Gun(GunStats.P2000, _gunModule);
|
Gun gun = new Gun(GunStats.P2000, _gunModule);
|
||||||
_gunModule.registerGun(gun, event.getPlayer());
|
_gunModule.registerGun(gun, event.getPlayer());
|
||||||
|
Loading…
Reference in New Issue
Block a user