- En iyi cevaplar
- 0
Evet arkadaşalr neden çalışmadı?
Main.java:
Plugin.yml:
Main.java:
Kod:
package com.farukalpay.oyuncugirdi;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public class Main extends JavaPlugin implements Listener{
public void PlayerJoinEvent(Player event) { }
public void PlayerJoinEvent(){
Bukkit.getServer().getPluginManager().registerEvents(this, this);
}
public boolean onCommand(CommandSender sender, Command cmd, String Label, String[] args){
Player oyuncu = (Player) sender;
Bukkit.broadcastMessage(ChatColor.GREEN + "(playerName) Adli oyuncu Servere Girdi!".replace("(playerName)", sender.getName()));
oyuncu.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5, 1));
return false;
}
}
Plugin.yml:
Kod:
name: ilkpluginim
author: Secret_wither
verison: 1.0
main: com.farukalpay.oyunagirdi