-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
200 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
### Maven ### | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
|
||
|
||
### Intellij ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio | ||
|
||
*.iml | ||
|
||
## Directory-based project format: | ||
.idea/ | ||
# if you remove the above rule, at least ignore the following: | ||
|
||
# User-specific stuff: | ||
# .idea/workspace.xml | ||
# .idea/tasks.xml | ||
# .idea/dictionaries | ||
|
||
# Sensitive or high-churn files: | ||
# .idea/dataSources.ids | ||
# .idea/dataSources.xml | ||
# .idea/sqlDataSources.xml | ||
# .idea/dynamic.xml | ||
# .idea/uiDesigner.xml | ||
|
||
# Gradle: | ||
# .idea/gradle.xml | ||
# .idea/libraries | ||
|
||
# Mongo Explorer plugin: | ||
# .idea/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.ipr | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
/bin/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
|
||
|
||
### Eclipse ### | ||
*.pydevproject | ||
.metadata | ||
.gradle | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
|
||
# Eclipse Core | ||
.project | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# Java annotation processor (APT) | ||
.factorypath | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
# sbteclipse plugin | ||
.guild | ||
|
||
# TeXlipse plugin | ||
.texlipse | ||
|
||
|
||
### Java ### | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# Personal debugging stuff | ||
debugging/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
src/main/java/pl/daffit/megakilof/command/DajkilofaCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
package pl.daffit.megakilof.command; | ||
|
||
import org.bukkit.ChatColor; | ||
import org.bukkit.Material; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.inventory.ItemStack; | ||
import org.bukkit.inventory.PlayerInventory; | ||
import pl.daffit.megakilof.MegaKilofPlugin; | ||
|
||
public class DajkilofaCommand implements CommandExecutor { | ||
|
||
private final MegaKilofPlugin mega; | ||
|
||
public DajkilofaCommand(MegaKilofPlugin mega) { | ||
this.mega = mega; | ||
public DajkilofaCommand(MegaKilofPlugin megaPlugin) { | ||
} | ||
|
||
@Override | ||
public boolean onCommand(CommandSender mega, Command kilof, String jest, String[] meega) { | ||
public boolean onCommand(CommandSender megaSender, Command megaCommand, String megaLabel, String[] megaArguments) { | ||
|
||
if (!(mega instanceof Player)) { | ||
mega.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cKonsola Nie Moze Kilofa")); | ||
if (!(megaSender instanceof Player)) { | ||
megaSender.sendMessage(MegaKilofPlugin.CONSOLE_DENY_MESSAGE); | ||
return true; | ||
} | ||
|
||
if (!mega.hasPermission("KILOF.ADMIN")) { | ||
mega.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cKomenda Tylko Dla Adminow")); | ||
if (!megaSender.hasPermission(MegaKilofPlugin.ADMIN_PERMISSION)) { | ||
megaSender.sendMessage(MegaKilofPlugin.PERMISSION_DENY_MESSAGE); | ||
return true; | ||
} | ||
|
||
((Player) mega).getInventory().addItem(new ItemStack(Material.DIAMOND_BLOCK, 3), new ItemStack(Material.STICK, 2)); | ||
Player player = ((Player) megaSender); | ||
PlayerInventory inventory = player.getInventory(); | ||
inventory.addItem(new ItemStack(Material.DIAMOND_BLOCK, 3), new ItemStack(Material.STICK, 2)); | ||
|
||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
src/main/java/pl/daffit/megakilof/listener/InventoryClickListener.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: megakilof | ||
version: x1.2 | ||
name: ${project.name} | ||
version: ${project.version} | ||
main: pl.daffit.megakilof.MegaKilofPlugin | ||
author: Daffit | ||
author: PinkLolicorn | ||
commands: | ||
megakilof: {} | ||
dajkilofa: {} |