ModifiedSpectator BETA-1.0

Here is a modified version of the spectatormode.

  1. WorldWideDev
    Tested Minecraft Versions:
    • 1.8
    Languages Supported:
    English
    ______________________________________________________________

    Commands:

    /modifiedspectator update

    Spectator commands:
    /spectator
    /spec
    (You can add your own commands)

    Features:
    Silent chest opening
    Flymode
    Can see other spectators
    Automatic updater
    Fake Join- & Quitmessage
    Different Tablistname
    Get last [Location|Inventory|Heart|...]
    Full configureable
    Able to use special charakter in the config.yml
    API / API-Mode


    API:

    Use the ModifiedSpectatorAPI.class
    Code (Java):
    ModifiedSpectatorAPI msapi = new ModifiedSpectatorAPI(player);

    Enable/Disable the spectatormode:
    Code (Java):
    msapi.change();

    Add player to the registered spectator list:
    Code (Java):
    msapi.add();

    Remove player to the registered spectator list:
    Code (Java):
    msapi.remove();

    Ask player is in the registered spectator list:
    Code (Java):
    msapi.is();

    Enable/Disable the vanish:
    Code (Java):
    msapi.vanish(true|false);

    Update the Plugin:
    Code (Java):
    ModifiedSpectatorAPI.downloadFile(CommandSender sender)

    Add a custom command:
    Code (Java):
    ModifiedSpectatorAPI.addCommand(command)

    Remove a custom command:
    Code (Java):
    ModifiedSpectatorAPI.removeCommand(command)

    Save the commands in the file:
    Code (Java):
    ModifiedSpectatorAPI.saveCommands()

    Save the commands in the file:
    Code (Java):
    ModifiedSpectatorAPI.saveCommands()
    Code of the 'change' methode:
    Code (Java):

        @SuppressWarnings("deprecation")
       public static void change() {
           if(is()) {
               remove();
               if(yaml().getBoolean("lastFlying")) {
               player.setFlying(lastFlyingBoolean.get(playername));
               player.setAllowFlight(lastAllowFlightBoolean.get(playername));
               }
               if(yaml().getBoolean("lastLocation")) {
               player.teleport(lastLocation.get(playername));
               }
               if(yaml().getBoolean("lastLevel")) {
               player.setLevel(lastLevel.get(playername));
               player.setExp(lastExp.get(playername));
               }
               player.setPlayerListName(lastPlayerlistName.get(playername));
               if(yaml().getBoolean("lastGamemode")) {
               player.setGameMode(lastGamemode.get(playername));
               }
               if(yaml().getBoolean("lastInventory")) {
               player.getInventory().setContents(lastInventory.get(playername));
               player.getInventory().setArmorContents(lastArmor.get(playername));
               }
               if(yaml().getBoolean("lastHotbar")) {
               player.setHealth(lastHealth.get(player.getName()));
               player.setHealthScale(lastHealthscale.get(player.getName()));
               player.setFoodLevel(lastFoodlevel.get(player.getName()));
               }
               if(yaml().getBoolean("lastSlot")) {
               player.getInventory().setHeldItemSlot(lastHelditemslot.get(playername));
               }
               player.spigot().setCollidesWithEntities(lastCollidies.get(playername));
               vanish(false);
               if(!yaml().getBoolean("APImode")) {
               if(yaml().getBoolean("Messages.Quit.Message")) {
               player.sendMessage(yaml().getString("Messages.QuitMessage").replace("&", "§"));
               }
               if(yaml().getBoolean("fakeJoin")) {
                   Bukkit.broadcastMessage(yaml().getString("JoinMessage").replace("&", "§").replace("%player%", player.getName()));
               }
               Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getPlugin(Main.class), new Runnable() {
                   
                   @Override
                   public void run() {
                       player.sendTitle("", "");
                   }
               }, 20);
               if(yaml().getBoolean("Sound")) {
               player.playSound(player.getLocation(), Sound.CHICKEN_EGG_POP, 5, 5);
               }
               }
               if(player.getGameMode() == GameMode.SURVIVAL) {
                   player.setAllowFlight(false);
                   player.setFlying(false);
               }
           }else {
               add();
               lastFlyingBoolean.put(playername, player.isFlying());
               lastAllowFlightBoolean.put(playername, player.getAllowFlight());
               lastLocation.put(playername, player.getLocation());
               lastLevel.put(playername, player.getLevel());
               lastExp.put(playername, player.getExp());
               lastPlayerlistName.put(playername, player.getPlayerListName());
               lastGamemode.put(playername, player.getGameMode());
               lastInventory.put(playername, player.getInventory().getContents());
               lastArmor.put(playername, player.getInventory().getArmorContents());
               lastHealth.put(playername, player.getHealth());
               lastHealthscale.put(playername, player.getHealthScale());
               lastFoodlevel.put(playername, player.getFoodLevel());
               lastCollidies.put(playername, player.spigot().getCollidesWithEntities());
               lastHelditemslot.put(playername, player.getInventory().getHeldItemSlot());
               player.getInventory().clear();
               player.setHealth(20);
               player.setFoodLevel(20);
               player.setHealthScale(2);
               player.spigot().setCollidesWithEntities(false);
               vanish(true);
               player.setGameMode(GameMode.ADVENTURE);
               if(!yaml().getBoolean("APImode")) {
                   if(yaml().getBoolean("fakeQuit")) {
                       Bukkit.broadcastMessage(yaml().getString("QuitMessage").replace("&", "§").replace("%player%", player.getName()));
                   }
               if(yaml().getBoolean("extraPlayerlistName")) {
               player.setPlayerListName(yaml().getString("PlayerlistName").replace("&", "§").replace("%player%", player.getName()));
               }
               if(yaml().getBoolean("Messages.Enter.Message")) {
               player.sendMessage(yaml().getString("Messages.EnterMessage").replace("&", "§"));
               }
               if(yaml().getBoolean("Sound")) {
               player.playSound(player.getLocation(), Sound.CHICKEN_EGG_POP, 5, 5);
               }
               Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getPlugin(Main.class), new Runnable() {
                   
                   @Override
                   public void run() {
                       player.sendTitle("", "");
                   }
               }, 20);
               }
               
               Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getPlugin(Main.class), new Runnable() {
                   
                   @Override
                   public void run() {
                       player.setAllowFlight(true);
                       player.setFlying(true);
                       player.teleport(new Location(player.getWorld(), player.getLocation().getX(), ((player.getLocation().getY())+(0.01)), player.getLocation().getZ(), player.getLocation().getYaw(), player.getLocation().getPitch()));
                   }
               }, 1);
           }
       }
     


    Config:
    Code (YAML):
    APImode: false
    lastLocation
    : true
    lastLevel
    : true
    lastHotbar
    : true
    lastInventory
    : true
    lastGamemode
    : true
    lastFlying
    : true
    lastSlot
    : true
    extraPlayerlistName
    : true
    fakeJoin
    : true
    fakeQuit
    : true
    Sound
    : true
    Hit
    : true
    Damage
    : true
    Build
    : true
    Interact
    : false
    CanDisableFly
    : false
    Hunger
    : false
    SilentChestOpen
    : true
    dropItems
    : false
    pickupItems
    : false
    PlayerlistName
    : '&eV &8| &e%player%'
    JoinMessage
    : '&e%player% joined the game'
    QuitMessage
    : '&e%player% left the game'
    Permission
    : modifiedspectator.use
    AdminPermission
    : modifiedspectator.admin
    noPermission
    : '&cI''m sorry, but you do not have permission to perform this command.'
    Messages
    :
      EnterMessage
    : '&7You are now in &bspectator &7mode&8.'
      Enter
    :
        Message
    : true
      QuitMessage
    : '&7You are &cno longer &7now in &bspectator &7mode&8.'
      Quit
    :
        Message
    : true
    Commands
    :
    - /spectate
    - /spec


    Videos:
    ...
    ______________________________________________________________
    GreenDragonYT likes this.

Recent Updates

  1. NOW RELEASED VERSION
  2. NOW RELEASED
  3. NOW RELEASED

Recent Reviews

  1. Alihan
    Alihan
    5/5,
    Version: BETA-1.0
    Wow. This plugin is really good. Good for checking players if they're hacking or not. And its a good feature for players. It's secure and very easy to use. The config is easy and full configureable. Please make more Plugins! <3
  2. GreenDragonYT
    GreenDragonYT
    5/5,
    Version: BETA-1.0
    BEST PLUGIN GIVE ME MORE OF THEM I NEVER SEE A BETTER SPEC MODE PLUGIN IN THE INTERNET EVERY DAY I SEARCH SOMETHING LIKE THIS