Creating a first test, to verify if my install worked properly
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package eu.mhsl.craftattack.spawn.craftattack.appliances.gameplay.mobSilenceNametag;
|
||||||
|
|
||||||
|
import eu.mhsl.craftattack.spawn.core.appliance.Appliance;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class FirstTestClass extends Appliance {
|
||||||
|
|
||||||
|
public String greetPlayer(Player player) {
|
||||||
|
return "Hello, " + player.getName() + "! Test 1";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package eu.mhsl.craftattack.spawn.craftattack.appliances.gameplay.mobSilenceNametag;
|
||||||
|
|
||||||
|
import eu.mhsl.craftattack.spawn.core.appliance.ApplianceListener;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
||||||
|
public class FirstTestListener extends ApplianceListener<FirstTestClass> {
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) {
|
||||||
|
String greeting = this.getAppliance().greetPlayer(event.getPlayer());
|
||||||
|
event.getPlayer().sendMessage(greeting);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user