Zákaz JUMP

Technická podpora k herním serverům Minecraft a Tekkit
Message
Autor
Uživatelský avatar
InspecteurKebab
Příspěvky: 29
Registrován: 16 bře 2016, 14:53
Reputation: 0

Zákaz JUMP

#1 Příspěvekod InspecteurKebab » 30 kvě 2016, 15:06

82.208.17.43:27760

Ahojte, neví mi nekdo poradit plugin abych zakázal skákaní, chcu plugin ne žádný residence a blbosti, nebo lepší kod, hledal jsem na netu, a skoušel jsem to sám z Vectorem no, ale neuspešne.. Dekuji
Když ti někdo pomúže tak ho odměn +K
Pracuji v javě,html,css, a učím se php

Uživatelský avatar
Ju3eN
Příspěvky: 539
Věk: 23
Registrován: 04 kvě 2015, 06:44
Reputation: 1
Bydliště: 192.168.0.1

Re: Zákaz JUMP

#2 Příspěvekod Ju3eN » 30 kvě 2016, 15:26

Kód: Vybrat vše

 
package monowii.noJump;
 
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
 
public class noJump extends JavaPlugin implements Listener
{
public void onEnable()
{
getServer().getPluginManager().registerEvents(this, this);
 
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
public void run() {
for (Player p : getServer().getOnlinePlayers()) {
p.removePotionEffect(PotionEffectType.JUMP);
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1200, -127));
}
}
 
}, 80L, 80L); //Every 2 secondes
}
 
@EventHandler
public void onJoin(PlayerJoinEvent e)
{
e.getPlayer().removePotionEffect(PotionEffectType.JUMP);
e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1200, -127));
}
 
}
 


Zpět na „Minecraft, Tekkit“

Kdo je online

Uživatelé prohlížející si toto fórum: Google [Bot] a 30 hostů