Remove old code

This commit is contained in:
Ghoti 2019-01-25 13:04:10 -06:00
parent 6dcaacee49
commit 70c606b8df
2 changed files with 13 additions and 42 deletions

View File

@ -19,6 +19,8 @@ import com.fpghoti.classicswords.item.ClassicSword;
import com.fpghoti.classicswords.item.SetAttributes; import com.fpghoti.classicswords.item.SetAttributes;
import com.fpghoti.classicswords.util.Storage; import com.fpghoti.classicswords.util.Storage;
/** For 1.13 */
public class ClassicSwordsMain extends JavaPlugin{ public class ClassicSwordsMain extends JavaPlugin{
private static ClassicSwordsMain plugin; private static ClassicSwordsMain plugin;
@ -30,7 +32,6 @@ public class ClassicSwordsMain extends JavaPlugin{
registerConfig(); registerConfig();
messageSet(); messageSet();
startItemCheck(); startItemCheck();
//startBlockCheck();
} }
public void onDisable() { public void onDisable() {
@ -81,14 +82,6 @@ public class ClassicSwordsMain extends JavaPlugin{
for(Player p : Bukkit.getOnlinePlayers()) { for(Player p : Bukkit.getOnlinePlayers()) {
if(p.getInventory().getItemInMainHand() != null) { if(p.getInventory().getItemInMainHand() != null) {
// if(ClassicSword.isCShield(p.getInventory().getItemInMainHand())) {
// if(p.isHandRaised()) {
// System.out.println("B");
// Storage.blockers.add(p);
// runBlock(p);
// }
// }
if(CItemType.isSword(p.getInventory().getItemInMainHand().getType())){ if(CItemType.isSword(p.getInventory().getItemInMainHand().getType())){
if(!ClassicSword.hasOpenInv(p)) { if(!ClassicSword.hasOpenInv(p)) {
@ -101,19 +94,12 @@ public class ClassicSwordsMain extends JavaPlugin{
ClassicSword.sendActionbar(p, "§eDurability: " + dur); ClassicSword.sendActionbar(p, "§eDurability: " + dur);
} }
} }
// if(p.isHandRaised() && Storage.swingers.contains(p) && ClassicSword.isCShield(p.getInventory().getItemInMainHand())) {
// p.getInventory().setItemInMainHand(ClassicSword.toBlockShield(p.getInventory().getItemInMainHand(), CItemType.getType(ClassicSword.getCShieldShortName(p.getInventory().getItemInMainHand()))));
// p.playSound(p.getLocation(), Sound.ENTITY_IRONGOLEM_STEP, 10.0F, 1.0F);
// ClassicSword.sendActionbar(p, "§aBlock hit!");
// Storage.swingers.remove(p);
//
// blockToShieldTimer(p);
// }
} }
} }
} }
// }.runTaskTimerAsynchronously(this, 1*20, 1*20);
}.runTaskTimerAsynchronously(this, 1*1, 1*1); }.runTaskTimerAsynchronously(this, 1*1, 1*1);
} }
@ -178,22 +164,6 @@ public class ClassicSwordsMain extends JavaPlugin{
} }
// public void startBlockCheck() {
// new BukkitRunnable(){
// public void run() {
// Storage.blockers.clear();
// for(Player p : Bukkit.getOnlinePlayers()) {
// if(p.getInventory().getItemInMainHand() != null && p.isBlocking()) {
// Storage.blockers.add(p);
// }
// }
//
// }
// // }.runTaskTimerAsynchronously(this, 1*20, 1*20);
// }.runTaskTimerAsynchronously(this, 1*1, 1*1);
// }
} }

View File

@ -1,5 +1,6 @@
main: com.fpghoti.classicswords.ClassicSwordsMain main: com.fpghoti.classicswords.ClassicSwordsMain
version: BETA-0.1 version: BETA-1.0
api-version: 1.13
name: ClassicSwords name: ClassicSwords
descripion: Bring back the old combat! descripion: Bring back the old combat!
commands: commands: