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