HomeJavaModsNoMoreAdsNorPhantoms
NoMoreAdsNorPhantoms
Bukkit/Spigot plugin that hide Advancements/Achievements of players and disable the spawning of Phantom mobs (introduced in Minecraft 1.13).

Created for a UHC server (using the fantastic UhcCore plugin) where just these features were missing.

The plugin is very light and simple, without stats or configs. This is the only file with all the source code:
Code (Java):
package ml.minefriends.nomoreadsnorphantoms ;

import org.bukkit.Bukkit ;
import org.bukkit.World ;
import org.bukkit.entity.Entity ;
import org.bukkit.entity.EntityType ;
import org.bukkit.entity.Phantom ;
import org.bukkit.entity.Player ;
import org.bukkit.event.EventHandler ;
import org.bukkit.event.EventPriority ;
import org.bukkit.event.Listener ;
import org.bukkit.event.entity.CreatureSpawnEvent ;
import org.bukkit.event.world.WorldLoadEvent ;
import org.bukkit.plugin.java.JavaPlugin ;


public final class NoMoreAdsNorPhantoms extends JavaPlugin implements Listener {
  @Override
  public void onEnable ( ) {
    getServer ( ) . getPluginManager ( ) . registerEvents ( this , this ) ;
  } //onEnable

  @EventHandler
  public void onCreatureSpawn ( CreatureSpawnEvent event ) {
    Entity entity = event. getEntity ( ) ;

    if ( entity. getType ( ) != EntityType. PHANTOM ) {
      return ;
    }

    //Phantom spawn && Natural spawn?
    if ( event. getSpawnReason ( ) == CreatureSpawnEvent. SpawnReason . NATURAL ) {
      event. setCancelled ( true ) ;   //Disable natural spawn
    }
  } //onCreatureSpawn

  //Hide advancements for new worlds
  @EventHandler ( priority = EventPriority. MONITOR )
  public void onWorldLoad ( WorldLoadEvent event ) {
    event. getWorld ( ) . setGameRuleValue ( "announceAdvancements" , "false" ) ;
  } //onWorldLoad
} //NoMoreAdsNorPhantoms
 

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

NoMoreAdsNorPhantoms is a free Minecraft Java mod. Compatible with Minecraft 1.14. Downloaded 104 times (via Spigot). Download it and open it directly in the game.

Explore more