mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 04:25:15 +01:00
OOppss.. PotionDrinkInfo has been left out :(
This commit is contained in:
parent
5f72fabd26
commit
935e8a4441
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Jobs Plugin for Bukkit
|
||||
* Copyright (C) 2011 Zak Ford <zak.j.ford@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.gamingmesh.jobs.actions;
|
||||
|
||||
import org.bukkit.potion.PotionType;
|
||||
|
||||
import com.gamingmesh.jobs.container.ActionInfo;
|
||||
import com.gamingmesh.jobs.container.ActionType;
|
||||
import com.gamingmesh.jobs.container.BaseActionInfo;
|
||||
|
||||
public class PotionDrinkInfo extends BaseActionInfo implements ActionInfo {
|
||||
private String potion;
|
||||
|
||||
public PotionDrinkInfo(String item, ActionType type) {
|
||||
super(type);
|
||||
this.potion = item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return PotionType.valueOf(potion).name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameWithSub() {
|
||||
return getName();
|
||||
}
|
||||
}
|
@ -90,6 +90,7 @@ import com.gamingmesh.jobs.actions.EntityActionInfo;
|
||||
import com.gamingmesh.jobs.actions.ExploreActionInfo;
|
||||
import com.gamingmesh.jobs.actions.ItemActionInfo;
|
||||
import com.gamingmesh.jobs.actions.ItemNameActionInfo;
|
||||
import com.gamingmesh.jobs.actions.PotionDrinkInfo;
|
||||
import com.gamingmesh.jobs.api.JobsChunkChangeEvent;
|
||||
import com.gamingmesh.jobs.container.ActionType;
|
||||
import com.gamingmesh.jobs.container.ExploreRespond;
|
||||
@ -1523,7 +1524,7 @@ public class JobsPaymentListener implements Listener {
|
||||
|
||||
// Player drinking a potion
|
||||
if (item.getType().equals(CMIMaterial.get(Material.POTION).isPotion()))
|
||||
Jobs.action(jPlayer, new ItemActionInfo(item, ActionType.DRINK));
|
||||
Jobs.action(jPlayer, new PotionDrinkInfo(String.valueOf(CMIMaterial.get(Material.POTION).isPotion()), ActionType.DRINK));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user